rvm gem install error?
It looks like you've set the root user to use the rvm install which is in your home folder. This means when you install a gem with sudo, the files will belong to root. So, when you try and install a gem as you, you're getting permission errors.
To fix, you need to chown the rvm folder back to you (I'm assuming, from your file paths, that your username is 'da' here)...
sudo chown -R da:da /Users/da/.rvm
To avoid this happening in the future, I'd recommend setting root's path to be either its own install of rvm, or system gems.
Bundle install error installing nokogiri (1.6.7.2). Gem installs but not for rails app
I fixed it, but it may be an unsatisfying answer. I went through all of the advice, installed various dependencies, changed various settings. Nothing seemed to work. Then I deleted the project folder and pulled it again from Github, reinstalled rvm, ran bundle install
again and it all worked normally.
So what was the one thing that I was missing? I can't be sure. But I can say if nothing else works, create a new folder and download the project again and run bundle install
.. after installing all dependencies / tools first of course, found here -> https://nokogiri.org/tutorials/installing_nokogiri.html
Unable to install rails. error: You don't have write permissions for the /usr/local/rvm/gems/ruby-2.6.3 directory
That's because at some point you used sudo
to install your rvm. So, the system will require sudo
permission to install later gems
When you use command $ sudo gem install rails -v 6.0.2.1
, you tell system to use normal directly installed ruby, not via rvm
, so it warns you No such /user/bin/gem
error
The solution for this is to change ownership of all files in the ~/.rvm
directory to current account, as if you're using root
account by following command
sudo chown -R $USER ~/.rvm
RVM Bundle Install Missing Gem Error
gem uninstall bundler && rvm @global do gem install bundler && bundle -v
bundler is installed by rvm by default into the @global gemset which gets mixed into default as well. something smells with that install, but that set of commands should fix it if that's all that's bad. your rvm output didn't look crazy.
RVM gem permissions error
You missed to use ruby, you can do it with:
rvm use 1.9.3 --install
In case 1.9.3 was not installed, this command will also install it!
It also looks you are using Ubuntu, make sure you are not using RVM from Ubuntu package - that thing is broken! You can find instruction how to fix it here: https://stackoverflow.com/a/9056395/497756
RVM bundler installed ERROR: Gem bundler is not installed, run `gem install bundler` first
It looks like you're probably running the wrong version of gem
. In my RVM setup, using the shell command overrides recommended with RVM (source "$HOME/.rvm/scripts/rvm"
in your .bashrc
or .zshrc
or another suitable startup file), gem
is normally a shell function. It does some RVM magic under the covers and then runs the real gem
command. In my case, both ruby
and gem
run out of the same version directory:
/home/jim/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
/home/jim/.rvm/rubies/ruby-1.9.3-p327/bin/gem
Make sure you're sourcing the RVM startup script.
Your PATH
looks ok. Make sure you have a /home/username/.rvm/rubies/ruby-1.8.7-p371/bin/gem
command. If not, you may have to reinstall ruby-1.8.7.
Running rvm current
will show which Ruby version and gemset are being used. Make sure there's a gem
in the path that matches the Ruby version.
Related Topics
Have Devise Create a Subdomain on Registration
Passenger: Cannot Load Such File Rubygems/Builder
Change HTML Form Id Generated by Form_For Rails 3.1
"Use" Keyword/Word in Ruby/Rails/Rack Code
Architecture for a Modular, Component-Based Sinatra Application
How to Return Correct Http Error Codes from Ruby on Rails Application
Rbenv: Ruby: Command Not Found
Chef and Erb Templates. How to Use Boolean Code Blocks
Is There a Workaround to Open Urls Containing Underscores in Ruby
Sleep Until Condition Is True in Ruby
Rails Way to Detect Mobile Device
Carrierwave Fog Amazon S3 Images Not Displaying
Why Does Date Exist in Ruby Before It Is Required
Why Do I Get "Including Capybara::Dsl in the Global Scope Is Not Recommended!"
Env: Ruby\R: No Such File or Directory