small medium large xlarge

Generic-user-small
10 Aug 2011, 19:40
AURELIEN SCHLUMBERGER (2 posts)

Hello I recently the book to start the rails adventure.

So far things have been going smoothly until I ran

rake db:migrate
rake aborted!
no such file to load -- bundler/setup

I Googled for solutions and I don’t really understand the bricabrac behind this.

I tried

Aurelien-Schlumbergers-MacBook-Pro:~ Aurelien$ gem install sqlite3-ruby
Fetching: sqlite3-ruby-1.3.3.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /opt/local/lib/ruby/gems/1.8 directory.

I aslo made sure the Rake gem is in the right folder and it appears to be in the ~~~ Aurelien-Schlumbergers-MacBook-Pro:~ Aurelien$ which rake /opt/local/bin/rake ~~~

I then went to the depot directory and tried:

Aurelien-Schlumbergers-MacBook-Pro:depot Aurelien$ gem list -d bundler

*** LOCAL GEMS ***

[EDIT] When I pass this command I get:

Aurelien-Schlumbergers-MacBook-Pro:depot Aurelien$ gem list

*** LOCAL GEMS ***

rake (0.9.2)
sqlite3 (1.3.4)

and it appears to be empty….

Finally I tried to see if the Sqlite is there and ran the IRB commands require ‘sqlite3’ and returned true.

I am a bit at a loss.

You’re help would be most appreciated.

Aurelien

Generic-user-small
11 Aug 2011, 18:21
AURELIEN SCHLUMBERGER (2 posts)

Hello again,

I fixed the problem so I will share it. I was indeed missing the Bundler gem.

When I ran the command I had a permission problem during the installation phase.

Aurelien-Schlumbergers-MacBook-Pro:~ Aurelien$ gem install bundler
Fetching: bundler-1.0.17.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /opt/local/lib/ruby/gems/1.8 directory.

The solution was to add as a prefix the “sudo” and it bypassed the permission problem

sudo gem install bundler

All that was left was to go back to the depot project and run the command

bundle install

The solution was very simple but I missed the permission error during the installation phase. Maybe it should be noted within the book if a similar case happens? Especially for those who are discovering not only Ruby and Rails, but also the command lines.

You must be logged in to comment