
...
- Install Ruby 1.9.3 (to match the Rails Tutorial settings)
To do this, I used the Ubuntu Software Center to install the Synaptic Package Manager. (Yes, this is redundant, as both do similar things. However, I'm more familiar with Synaptic.) Then, choose "libruby 1.9.3", accept the required packages and click "Apply". (Downloads ~30MB and installs for you.)
Alternately, I could have gone to the command line and done the same thing with:
sudo apt-get install ruby1.9.3 - Install Git. The tutorial directs you here, which was helpful. However, "git-core" is now considered 'obsolete' (in Synaptic). So, at the command line, I did:
sudo apt-get install git - Install Curl. The tutorial then directed me to a RVM installer PDF. However, inside, it suggested to install both git-core and curl. I looked up "curl" and it helps transfer data between servers, so I did that quickly (as it was small).
sudo apt-get install curl - The RVM installer said the following, so I did this:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
FAIL Alert! Sadly, this failed. However, I followed the link contained in the code above and realized that everything had been moved and simplified here:
https://rvm.io/rvm/install/
FAIL Alert! If you've followed my Lubuntu install exactly as above, then you won't have "make" installed! (Maybe Lubuntu is weird...?) So I did:
sudo apt-get install make
Then, I had to re-run the "install rvm" command from https://rvm.io/rvm/install/ like this:
curl -L https://get.rvm.io | bash -s stable --ruby
This worked brilliantly (I think) but took a surprisingly long time! (Did I mention my laptop was old?!)
To double-check that everything is setup, you can confirm that your home directory now has a folder called ".rvm" and also your ".bashrc" file contains a last line something like:
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
SUCCESS!
I wasn't sure that the rvm install worked properly, so I found this instruction, and running it made me feel much more successful than the above process. (Note: This probably just re-installed everything that was already good above.)
rvm get head && rvm reinstall 1.9.3
(I get the theory of rvm, but don't understand very well how it works.) - Now, close the terminal window. Open a new terminal window (to cause the above commands to be active in your new terminal window).
- At this point, I put everything on pause until I could get gedit installed. I used it in the past, and so was willing to go back again. I used the standard apt-get line:
sudo apt-get install gedit
With gedit working, I tried a few customizations that I found here. These were designed to make gedit look more like TextMate for MacOSX. They seemed to work well, although I have never used TextMate, so I don't know the comparison. (Maybe ignorance is bliss, as my budget doesn't include getting a Mac anytime soon.)
sudo apt-get install gedit-plugins
The Monaco text link was broken, but it's freely available with a Google search. I downloaded it to /home/{user}/Downloads and then used the following lines. (Replace {user} with your username.) The instructions said to put this in ~/.fonts, but since I didn't have one, I did it this way:
cd /home/{user}/Downloads
sudo chown root.root MONACO.tff
sudo mkdir /usr/share/fonts/truetype/monaco
sudo mv MONACO.tff /usr/share/fonts/truetype/monaco/. - Further to all of this, the Sudobits site suggested a "gedit-gmate" install. I did this, but then gedit began failing. I had no idea why gedit was failing but I uninstalled the gedit-gmate plugin and now gedit works fine (I think).
- I did manage to get the DarkMate theme installed. Again, I downloaded it to my Downloads folder and then did:
cd /usr/share/gtksourceview-3.0/styles/
sudo cp /home/{user}/Downloads/darkmate.xml .
sudo chown root.root darkmate.xml
The DarkMate style then appeared in my gedit preferences. - The tutorial directed me to a 7 month old installation guide (so taken with a grain of salt). The guide directed me to install the following (all in one line):
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g
zlib1g-dev zlib libssl-dev libyaml-dev libxml2-dev libxslt-dev libc6-dev
ncurses-dev autoconf automake libtool bison - I tried to follow the standard for "rvm use 1.9.3" but all I get are warnings about not being able to use "rvm use ...". So I've givenup. After all, I probably didn't need the rvm, as I only intend to have one install. But I'm following tutorials, so I just assume that they know more than me..... :-)
- Now the tutorial wants to install rails next, but I know (from last time) that I want to install my database first. Last time, I used postgres database (sometimes called "PostgreSQL") and I had followed the instructions (with great explanations) here.
sudo apt-get install postgresql postgresql-contrib libpq-dev
sudo -u postgres createuser --superuser {dbusername}
In psql mode:
\password {dbusername}
{enter your new password twice}
\q {to quit}
sudo -u postgres createdb admin
I just want to use this as localhost, so postgres is setup! However, I also like to have web access to administer postgres, so I also installed phppgadmin (and said "Y" to a whole slew of other programs upon which phppgadmin depends):
sudo apt-get install phppgadmin
Once this is done, you can check into your postgres database in a web browser. Probably, apache isn't running, so get it started like this:
sudo /etc/init.d/apache2 start {or 'restart' if applicable}
Then go to http://localhost/phppgadmin in your web browser.
(Remember your username and password!) - FAIL Alert! At this point, I tried but failed with:
gem install rails
My error message said:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems
This was an odd error, since rvm is supposed to put the gems somewhere different (like ~/.rvm or ~/.gems)
I'm unsure as to what strategy to try next, so I'll post here when I figure out what to do!
Maybe later, we can pick up at my older blog post to get a Rails App installed and ready to work on!