Issue
I have problem with install of rails 3, and that is that under root nothing works considering ruby on rails. lets say if I do this:
~/ruby/ev_rada$ sudo bundle install
sudo: bundle: command not found
~/ruby/ev_rada$
But if I find manually i can do this:
~/ruby/ev_rada$ sudo /usr/local/rvm/gems/ruby-1.9.2-p290/bin/bundle install
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)
from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1195:in `gem'
from /usr/local/rvm/gems/ruby-1.9.2-p290/bin/bundle:18:in `<main>'
same thing is with gem, but installing gems works (I think ) :)
~/ruby/ev_rada$ sudo gem install jquery-rails
sudo: gem: command not found
~/ruby/ev_rada$ sudo /usr/local/rvm/bin/gem-ruby-1.9.2-p290 install jquery-rails
Successfully installed jquery-rails-1.0.13
1 gem installed
Installing ri documentation for jquery-rails-1.0.13...
Installing RDoc documentation for jquery-rails-1.0.13...
Thank you for any help
I think I got latest ruby and rails
~/ruby/ev_rada$ rails console
Loading development environment (Rails 3.0.10)
ruby-1.9.2-p290 :001 >
Solution
Looks like you're using RVM, with which you typically don't sudo
. Is there a particular reason you need to use sudo to run bundler? Do you not have access to the directory? If you do need sudo with RVM, use rvmsudo
instead.
Answered By - numbers1311407