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)

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

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.

|improve this answer|||||

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

|improve this answer|||||

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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.