Installing Ruby on Rails on Windows

What a nightmare. I didn’t quite believe the lecturer’s notes on the Web Apps MOOC when he said that it may be a bit of pain installing Rails on Windows, and that we should follow this other guy’s tut on how to do it.

I think the problem with the installation process (at least for me) is that everything appears to be working fine, until it isn’t fine. I got as far as getting Ruby installed, Rails and other gems loaded up. The first mistake I made was not completing the installation process (I was using my VM). I then decided it’s probably not a good idea to mess up my pristine VM, especially if Rails was going to mess up my Python environment, so I decided to install it on my tablet instead.

This install went smoother, until I attempted to create a test app. While trying to install the required gems for the app, it broke in a very specific way. After following the steps in the highest rated answer on that page, I tackled my next error.

Once it was evident that the setup clearly wasn’t working, I went nuclear and did a clean uninstall of RoR, and started again. As expected, the installation failed again, in the same manner.

At this point I gave up and jumped to the lecturer’s 3rd suggestion: Using Nitrous.io. To be continued!

Advertisements

If an install worked the first time I would be surprised

Recently I’ve expanded my horizons and installed openpyxl to enable direct manipulation of Excel files in Python. And yes, it was an absolute nightmare to install because easy_install wouldn’t work, manual install wouldn’t work…so after much back and forth (and probably while IT wasn’t looking), I got it working.

After I downloaded easy_install and unzipped the package, I extracted it and added the python scripts folder to my PATH. I ran ez_setup.py and left it. I downloaded the manual install for openpyxl and unzipped it in an arbitrary folder.

I then ran an elevated command prompt and changed to the openpyxl directory, where I then typed the command C:Python27ArcGIS10.1python setup.py install. After randomly not working a couple of times (and after I rebooted my machine), things started scrolling by so it seemed fine. Of course, when I tried to quickly import openpyxl in IDLE, it could not resolve it. After a couple of days, nothing was happening, so I tried easy_install openpyxl. To my surprise, it tried to download an egg but said I already have the latest version installed. So again, I tried to import openpyxl in IDLE and Eclipse, but no such luck.

After much googling, I then came across an answer in the Google group about adding the site-packages folder to the PYTHONPATH. Et voila, openpyxl baby! I’ll be posting a script I wrote yesterday using it.