problem doing bundle install on ubuntu
my situation is as follows:
I installed rvm as a 开发者_运维技巧root user on Ubuntu 10.04. As a root user I then installed ruby 1.9.2 and rails 3.0.1 using rvm at location '/rvm/gems/ruby1.9.2-p0/'. Then I logged in as myself on ubuntu and tried creating a rails application in /home/myself/www/myapp. When I do 'bundle install' I get the following error:
'Permission Denied' - home/myself/www/myapp/Gemfile.lock (Errno: EAccess) from /usr/local/rvm/gems/ruby1.9.2-p0/gems/bundler-1.0.7/lib/bundler/definition.rb
I am also not able to do sudo bundle install.
Moreover, when I log back in as root and try to do bundle install from there...I get error:
bash: bundle: command not found.
I am very lost now. How can I get this to work???
May you should check the permissions of your rails app folder, review the owner and group because I had the same problem and I has solved with:
chown -R USER railsapp_folder
Good luck!
When you logged in as root, did you activate rvm using
rvm use 1.9.2
EDIT:
How about (logged in as root)
rvm use 1.9.2
cd /home/myself/www/myapp
bundle install
rvmsudo runs as sudo in the current environment and from the path it was called from.
You need to make sure you've added:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
into your ~/.bashrc
as per the instructions here (see "Post Install").
type rvm | head -1
should return rvm is a function
if you've done it correctly.
I highly recommend starting over and installing RVM under your own account. This tutorial is perfect.
精彩评论