user537244
user537244

Reputation: 31

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???

Upvotes: 3

Views: 4956

Answers (5)

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!

Upvotes: 2

Brian Glick
Brian Glick

Reputation: 2201

I highly recommend starting over and installing RVM under your own account. This tutorial is perfect.

Upvotes: 0

nickgrim
nickgrim

Reputation: 5437

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.

Upvotes: 0

Jim Keener
Jim Keener

Reputation: 9303

rvmsudo runs as sudo in the current environment and from the path it was called from.

Upvotes: 0

kelso
kelso

Reputation: 394

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

Upvotes: 1

Related Questions