I managed to get a day off work today so can hopefully get some good study time in today!
In some of the casual reading I have been doing, I have come across people talking about problems running Rails on Windows and sometimes not knowing for sure if the problems are with their code or the installer. Since I can't afford to buy a Mac currently, I decided to setup a Linux install so that I could try things out there as well if I run into problems.
I built the Linux box using Virtualbox and Ubuntu Server 12.04 LTS 32 bit edition. For the VM I gave it 1 GB of ram and had to enable extended features Enable PAE/NX on the System/Processor settings as will as set the network adapter to bridged mode.
During installation of Ubuntu I didn't install any additional packages and chose the defaults all the way through. Once it was installed I logged into the command prompt and ran the following commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lxde #this is a lightweight desktop environment
I then did a reboot and was able to login to the graphical environment. Opened up a terminal window to finish setup.
sudo apt-get install synaptic #this is the graphical package manager
I then used synaptic package manager and installed gedit and Firefox.
I had used the package manager to install RVM before I had found out it was broken in Ubuntu. Following some instructions I found on StackOverflow I was able to clean out the leftovers from the package manager install.
sudo apt-get --purge remove ruby-rvm
sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
open new terminal and verify its clean
env | grep rvm
Then I was able to install again doing this:
\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles
source ~/.rvm/scripts/rvm
rvm requirements
rvm use ruby --default
rvm rubygems current
gem install rails #This takes awhile to run
Once I mounted the Virtualbox guest additions on the host, on the VM using the command line I navigated into the /media/VBox directory and ran:
sudo ./VBoxLinuxAdditions.run
I am far from a Linux expert but it looks like I managed to get everything installed, at least irb runs. It seems that when ever I want to run irb from the command line I have to enter:
source ~/.rvm/scripts/rvm
in the terminal first. There must be a way that I can have that automatically run when ever I open the terminal window, but will need to do some additional research first.
No comments:
Post a Comment