I’m trying to install Ruby on rails, so first I installed RVM rvm install 1.9.2. After that install this gem install rails. It shows this error
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.8 directory.
Then I used this sudo chmod 0777 /var/lib/gems/1.8/
After that when I install, its showing this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /var/lib/gems/1.8/cache/railties-3.2.2.gem
Then I run sudo chmod 0777 /var/lib/gems/1.8/cache/railties-3.2.2.gem
After that I install gem install rails. Again its showing this error
ERROR: While executing gem ... (Errno::EISDIR)
Is a directory - /var/lib/gems/1.8/cache/railties-3.2.2.gem
You’re still using the system ruby install (1.8). To use the Ruby you’ve just installed with rvm, do
rvm use 1.9.2. Then trygem install railsagain. The Rails gem should be installed under your home directory, you shouldn’t need root permissions.To make the rvm Ruby the default, so you always start with it when you open a new terminal, do
rvm --default use 1.9.2(note that’s two dashes).