2

After installing ruby-rails-4.0 (4.0.2+dfsg-2) attempting to generate a new web application fails with the following error:

$ rails new hello .... run bundle install /usr/bin/ruby1.9.1: No such file or directory -- /usr/share/rubygems-integration/1.9.1/gems/bundler-1.3.5/bin/bundle (LoadError)

1
  • Sounds like you didn't install ruby, just rails. See my answer below for most up to date ruby/rails install.
    – geoffmcc
    Dec 31, 2014 at 16:46

3 Answers 3

3

This will fix the issue:

sudo gem install bundler 

You'll most likely run into other gem dependencies:

sudo apt-get install libsqlite3-dev
sudo gem install sqlite3 -v '1.3.10'

come to mind.

1

Try with required packages

sudo gem install bundler
sudo apt-get install bison libffi-dev libgdbm-dev libyaml-dev sqlite3 libgmp-dev libssl-dev

if it is not exists in package manager try with sudo gem install

0

How did you install, using apt-get? You may have better luck if you purge all of ruby and rails and install using rvm. This will also get you a newer version of Ruby I believe. Anyways, first add the key.

 gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

Then install RVM stable with ruby and rails

 \curl -sSL https://get.rvm.io | bash -s stable --rails

It will take a little bit of time to download, configure and install, but after you should have latest Ruby, with rails working.

You can check version with

 rvm -v

You can check ruby version with

 ruby -v

And you can check rails with

 rails - v

I just set this up myself and it installed Ruby 2.2.0 and Rails 4.2.0

For more info see: https://rvm.io/rvm/install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .