Can't install Ruby on Rails with RVM on Ubuntu 13.04
There are some important packages your system needs before install rvm. Run at the terminal:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev \
sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake \
libtool bison subversion nodejs
Then install rvm with:
curl -L https://get.rvm.io | bash -s stable --ruby
Now you need to put a setting in your .bashrc
to add rvm to PATH for scripting. Run:
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
Open a new terminal and test rvm.
Unable to install Ruby on Rails on Ubuntu 16.04 LTS
If you install rvm
without sudo privileges, everything else should work as expected
If you have rvm installed, remove it using
rvm implode
or
rm -rf ~/.rvm
Then install rvm using
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable
Then install ruby with
rvm install 2.3.0
Use whichever version you wanna install.
Now go ahead and install rails
gem install rails
Error on installing ruby rvm
You're trying to install it with apt-get
. You probably installed ruby-rvm but since it's outdated it was installed broken. You probably have to delete it using synaptic or via sudo apt-get purge ruby-rvm
command. You should NOT install rvm via apt-get
. Read post from Ryan more careful. Correct command to install rvm is:
curl -L https://get.rvm.io | bash -s stable
Facing difficulty in Installation of Interactive Ruby shell and ruby in ubuntu 13.04 and getting started with rails
to use a gemset try writing
rvm use ruby_gemset_version
to check the rails version try to type rails -v
Using RVM on Ubuntu 12.04 to use Rails. The program 'rails' is currently not installed
You need to type source ~/.rvm/scripts/rvm
before attempting to use Rails.
I believe the RVM installation suggests putting this line (or something similar) in your .bashrc
.
Run the following command in Terminal:
echo "source \$HOME/.rvm/scripts/rvm" >> ~/.bashrc
This appends the line source \$HOME/.rvm/scripts/rvm
to the end of the .bashrc
file.
Doing so ensures that RVM is properly loaded each time you open up a terminal.
Can't find Ruby 1.9.2 after installing RVM
RVM is a version manager which enables you to decide which of multiple installed Ruby versions you want to use in your current shell session. RVM does this by providing a shell function named rvm
which can be used to switch between versions in the current session. This changes environment variables, especially the GEM_HOME and PATH, to match the currently selected Ruby installation.
Every installed Ruby version can be selected by a specific identifier string. If you had a system-wide Ruby installation already before you installed RVM, that one should be referenced by the string system
. The newly installed version in your case should be called 1.9.2
.
To make RVM work as intended, it is necessary to load the rvm
shell function into your shell. How to do this is described in the RVM Installation Documentation in section 2 - "Load RVM into your shell sessions as a function".
You can see if the shell function is correctly loaded when the command type rvm | head -n1
responds with:
rvm is a shell function
If not correctly loaded it will tell you something like this:
rvm is /home/someone/.rvm/bin/rvm
If you finally have it working you can switch your active Ruby version with commands like rvm 1.9.2
or rvm system
. You can get a list of all Ruby versions and their identifier strings recognized by RVM by the command rvm list
.
You can also specify which Ruby version shall be enabled in all new shell sessions from the beginning by issuing the following command once:
rvm --default 1.9.2
Related Topics
How Would You Parse a Url in Ruby to Get the Main Domain
No Such File to Load - Readline
Nokogiri, Open-Uri, and Unicode Characters
How to Get Request Referer Path
How to Convert a String to a Constant in Ruby
Double Pipe Symbols in Ruby Variable Assignment
How to Get a Date from Date_Select or Select_Date in Rails
Using Rails Migration on Different Database Than Standard "Production" or "Development"
Why Do I Get a "Permission Denied" Error While Installing a Gem
How to Search a Folder and All of Its Subfolders For Files of a Certain Type
Automatic Counter in Ruby For Each
Getting Fields_For and Accepts_Nested_Attributes_For to Work With a Belongs_To Relationship
How to Read a User Uploaded File, Without Saving It to the Database
Invalid Active Developer Path on MAC Os X After Installing Ruby
How to Call a Controller'S Method from a View (As We Call from Helper Ideally)
What Will Give Me Something Like Ruby Readline with a Default Value