Is it Me or Are Rails and Django Difficult to Install on Windows?

十年热恋 提交于 2019-12-11 03:15:50

问题


I tried getting these frameworks working on Windows Vista for a couple of days but to no avail.

Every single time I thought I had them working I would get some random error involving the PostgreSQL or MySQL setup, or the paths were screwed up or some other command line error "not recognized as an internal or external command" (or something). Someone told me that these frameworks are a lot easier to get running on Ubuntu but I really don't want to make that switch as everything I have is on Windows. Are these common problems when trying to get running on Windows?

I think I'll just stick with C# and .NET as everything seems to work pretty nicely together with none of this "install-twenty-different-components" stuff and see if they work together. Is Instant Django advisable to use?


回答1:


Yes. RoR and Django were difficult to install on Vista.

I apologize for not having specifics, but here's a general recount of my problem and how I overcame it. Maybe there is something here for you.

For Python: Your Vista install may have a pre-existing path variable for Python that interferes. For example, on my HP computer, HP has Python from the factory. The HP Python path pointed to the HP Python, not the latest that I download for Django. Check Control Panel-->System-->Advanced System Settings-->Advanced Tab-->Environment Variables-->System Variables, then check what the "PATH" is. I changed that path to my fresh install of Python, and then everything worked.

For RoR: Are you using the one click installer? I forgot the specifics, but I know right-clicking the 1-Click Installer file and "Run as Administrator" was one of the tricks.

For RoR and Django: Consider NOT using MySQL and Postgres, at this time. Using the default SQLite that comes with the Ruby/Python installers should keep you happy at this stage of the game. SQLite is good enough for tinkering and doesn't use as many resources as a full stack database.

Good luck!




回答2:


I have installed Django on multiple Windows systems (both XP and Vista) with absolutely no issues. After installing Python, it is as easy as typing this in a command line, in the folder to which you extracted Django:

python setup.py install

If you're on Vista, perhaps you can try running your command window "as administrator" to see if that gives you any better luck.




回答3:


Django didn't work on my Vista, and that's because Vista screws up command line arguments. See the bottom of this page for solution.

In my experience, Ubuntu and other Debian-based OSes are much more trouble-free developer environments for almost everything except C# and .NET stuff. That said, C# and .NET obviously are quite excellent on Windows.




回答4:


I use Instant Rails made to tackle the complaints of the difficult installation process on Windows. It contains Ruby, Rails, MySQL, PHP and phpMyAdmin. Downloading and extracting the file to a folder and running a script should do the work.




回答5:


django and python didn't work for me using the windows vista command line until I opened the windows registry and set:

Computer\HKEY_CLASSES_ROOT\py_auto_file\shell\open\command(Default)

to

"C:\Python26\python.exe" "%1" %*



来源:https://stackoverflow.com/questions/719431/is-it-me-or-are-rails-and-django-difficult-to-install-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!