0

I am trying to create a testing DB. I used the following command :

  rake db:schema:create

also tried various versions of code such as

sudo bundle exec rake db:create

I keep getting the same error :

rake aborted!
LoadError: no such file to load -- bundler/setup
/home/eshel/test/test_db/config/boot.rb:4:in `<top>'
/home/eshel/test/test_db/config/application.rb:1:in `<top>'
/home/eshel/test/test_db/config/application.rb:1:in `<top>'
/home/eshel/test/test_db/Rakefile:1:in `(root)'
/home/eshel/test/test_db/Rakefile:5:in `(root)'
(See full trace by running task with --trace)

Tried to install bundles many times but nothing worked so far.

What am I missing ?

7
  • Have you installed bundler? Commented Apr 5, 2016 at 13:17
  • bundle install is working properly? Commented Apr 5, 2016 at 13:18
  • Run gem install bundler and retry. Sidenote: please do not use sudo until you do understand what sudo is for. Commented Apr 5, 2016 at 13:20
  • yes I used this command : sudo bundle install Commented Apr 5, 2016 at 13:21
  • @Eshel: Please specify rails version which you are working now. Commented Apr 5, 2016 at 13:26

1 Answer 1

2

Try the following:

gem install bundler
bundle install
rake db:create
Sign up to request clarification or add additional context in comments.

5 Comments

It gave me this line : Bundle complete! 13 Gemfile dependencies, 51 gems now installed. Bundled gems are installed into /home/eshel/main_server. does it matter if i want them in a different place ? other than main_server folder ?
Could this be a problem with the jruby and ruby versions I am running ? I can't set the jruby and ruby versions to the ones that appear in the rvm list
try using bundle exec rake db:create.
Try to Install ruby with rvm with its latest version & then reinstall rails & execute above commands
Thanks ! I had a mismatch between the ruby and jruby versions that my app was using, after I worked it out, the above commands did the trick :) Thanks for your help

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.