Install Ruby on Rails

This method worked for me(Ubuntu Gnome 14.04)

1. sudo apt-get update
If there are errors you would most probably not be able to run 5th command, you can follow note below here or after the command as you want.

2. gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3;
Even if this command doesn't work don't worry because it didn't works for me too but I got ruby on rails installed then too. :P

If above command doesn't work then try this command:
    curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

3.  /bin/bash --login

4. curl -L get.rvm.io | bash -s stable;

5. source ~/.rvm/scripts/rvm;

6. rvm requirements;
If here problem comes then refer to note below and run the command from starting after following the note.

7. rvm install 2.1.2;

8. ruby -v
So to get little excited you can run this command that you have at least ruby installed on your system

9. rvm use 2.1.2 --default;

10. rvm rubygems current;

11. gem install rails;

12. rails -v
Way to go, if you got a version number but if you are stuck somewhere please refer google (esp. stack overflow, it helped me a lot)
No warranty to work!
But, it worked for me and if it works for u ;) gr8 then

Note: So u get errors, this method worked for me, try at your own risk(But there's not too much risk):
1. Check what error have you got, try resolving them by fixing them or ignoring them(Ignoring them: explained)

2. In terminal type: sudo /etc/apt

3. Comment out (use # before every line) all kind of statements which leads to an error (404 not found) in file sources.list .

4. You may also find a directory sources.list.d in which there are other files too, try finding there too.

5. Run your commands again.

6. Make sure after getting everything done you uncomment the lines you have commented.

7. For finding error creating lines try matching the URLs of error creating URLs and URLs mentioned in .list and .save files.


Some other useful commands:
1. To make rvm stable:
rvm get stable --auto-dotfiles

2. Make rvm 2.1.2 default (in case, you have more than one versions installed): rvm use 2.1.2 --default;

3. Install gem-bundle: 
gem install bundler


Some useful links:
https://rvm.io/integration/gnome-terminal
https://gorails.com/setup/ubuntu/14.10

Comments

Popular posts from this blog

Smart India Hackathon

From my experience in technology- Part 1

Install Java and Android Studio on Linux