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)
13 Answers
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.
Try with required packages
sudo gem install bundler
sudo apt-get install bison libffi-dev libgdbm-dev libyaml-dev sqlite3 libgmp-dev libssl-devif it is not exists in package manager try with sudo gem install
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 D39DC0E3Then install RVM stable with ruby and rails
\curl -sSL | bash -s stable --railsIt 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 -vYou can check ruby version with
ruby -vAnd you can check rails with
rails - vI just set this up myself and it installed Ruby 2.2.0 and Rails 4.2.0
For more info see: