How to install a Rails application when using RVM? - ruby-on-rails

I've followed instructions from this question on SO to set up RVM, rubies and gem lists.
I have created rubies 1.8.7 and 1.9.3. For the ruby 1.8.7 I have created a gemset called Organisator.
I have activated the 1.8.7 ruby and gemset "Organisator".
I navigated to the folder of my app and tried to run bundle install. I assume that's how I'm supposed to install the gems needed for my app, same way I did when I did not have RVM.
Error message I get:
root#user-VirtualBox:/home/user/RoR/testapp# bundle install
Fetching gem metadata from https://rubygems.org/.Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!
/usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- openssl (LoadError)
from /usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/net/https.rb:102
from /usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/net/http/persistent.rb:447:in `ssl'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/net/http/persistent.rb:216:in `connection_for'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/net/http/persistent.rb:358:in `request'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/fetcher.rb:135:in `fetch'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/fetcher.rb:163:in `fetch_dependency_remote_specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/fetcher.rb:122:in `fetch_remote_specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/fetcher.rb:70:in `specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/source.rb:234:in `remote_specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/source.rb:232:in `each'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/source.rb:232:in `remote_specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/source.rb:165:in `fetch_specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/source.rb:70:in `specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/lazy_specification.rb:53:in `__materialize__'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/spec_set.rb:86:in `materialize'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/definition.rb:122:in `resolve_remotely!'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/installer.rb:48:in `run'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/installer.rb:12:in `install'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/cli.rb:220:in `install'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/lib/bundler/vendor/thor/base.rb:386:in `start'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/gems/bundler-1.1.2/bin/bundle:13
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/bin/bundle:19:in `load'
from /usr/local/rvm/gems/ruby-1.8.7-p358#organizators/bin/bundle:19
I also get an error message when I try to create a new app:
root#user-VirtualBox:/home/user/RoR# rails new testapp
/usr/lib/ruby/vendor_ruby/railties/lib/rails_generator.rb:30:in `require': no such file to load -- active_support (LoadError)
from /usr/lib/ruby/vendor_ruby/railties/lib/rails_generator.rb:30
from /usr/lib/ruby/vendor_ruby/railties/bin/rails:16:in `require'
from /usr/lib/ruby/vendor_ruby/railties/bin/rails:16
I assume I've done something wrong when setting up RVM.
The only idea I have right now is installing all the gems from my gemfile and adding them to gemfile manually.
Versions
Ruby 1.8.7-p358
Rails 2.3.1.4
RVM 1.10.3
Ubuntu 11.10

please use the "quick fix" from here https://rvm.io/packages/openssl/
you have to ignore the rest of instructions, they are intended for systems that do not support packages (like osx)

Related

Passenger, RoR + Apache Bundler:Gemnotfound

I'm trying to set up my own VPS (Ubuntu 14.04), and have almost succeeded (I hope!).
I'm using passenger, Rails and Apache. When I browse to my IP, I get a bundle GemError, though when I run bundle install on my machine it tells me it's using all gems.
The problem first occurred with the json gem, which is the first gem. When I manually added "gem json, 1.8.3" to my Gemfile, the error went to the second gem of the list, minitest.
There are two weird messages on top which might be the problem, but I do not really understand those messages:
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Could not find minitest-5.6.1 in any of the sources (Bundler::GemNotFound)
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:92:in `block in materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:140:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:185:in `specs_for'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/definition.rb:174:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/environment.rb:18:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:13:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler.rb:127:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/setup.rb:18:in `<top (required)>'
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:399:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:277:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:404:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:276:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:99:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Passenger author here. This error usually means one of two things:
Your app isn't being run as the user that it's supposed to be run as. Please set passenger_user to explicitly specify a user.
Your app isn't being run with the Ruby interpreter that it's supposed to be run as. Please set passenger_ruby to explicitly set a path to the Ruby interpreter that is supposed to be used.
If all fails, try our new end-to-end deployment walkthrough. It should work guaranteed (assuming you are starting from scratch and using the latest Passenger version).

Installing Open Source Ticket Manager Brimir

I am new to ruby on rails.... I want to install OPEN SOURCE TICKET MANAGER created by BRIMIR http://getbrimir.com/ .... I have installed ruby 1.9.3, bundler 1.0.10.... but when i tried to install gem by giving command bundle install it shows following fatal error
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on o
r after 2011-11-01.
Gem.source_index called from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/
lib/bundler/shared_helpers.rb:3.
Fetching https://github.com/ivaldi/foundation_rails_helper.git
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/source.rb:560:in
``': No such file or directory - git clone "https://github.com/ivaldi/foundation
_rails_helper.git" "C:/Ruby193/lib/ruby/gems/1.9.1/cache/bundler/git/foundation_
rails_helper-c76b733ae8c7a4126f399e570cfc6ba3596f5359" --bare --no-hardlinks (Er
rno::ENOENT)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/sour
ce.rb:560:in `git'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/sour
ce.rb:619:in `cache'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/sour
ce.rb:532:in `specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/defi
nition.rb:147:in `block in resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/defi
nition.rb:145:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/defi
nition.rb:145:in `resolve'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/defi
nition.rb:90:in `specs'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/defi
nition.rb:85:in `resolve_remotely!'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/inst
aller.rb:35:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/inst
aller.rb:8:in `install'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/cli.
rb:226:in `install'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vend
or/thor/task.rb:22:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vend
or/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vend
or/thor.rb:246:in `dispatch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vend
or/thor/base.rb:389:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/bin/bundle:13:in
`<top (required)>'
from C:/Ruby193/bin/bundle:23:in `load'
from C:/Ruby193/bin/bundle:23:in `<main>'
Most gems do not like to work in Windows. You should use a better operating system (just any OS different than Windows should work)
after seeing you error stack trace i guess either u have't installed git on your computer or u have not set its Path. please double check it. after that when i copy and paste this link "https://github.com/ivaldi/foundation_rails_helper.git" then i found 404 error. which mean the url its trying to clone the project is not valid anymore. you should look this link "https://github.com/ivaldi/brimir" and follow the instructions.

Can’t run rails server

I’m working on getting my first rails application, but for whatever reason, when I run the command $rails server, my terminal throws back this error:
/Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'jquery-rails (= 2.0.0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
from /Users/Toni/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /Users/Toni/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /Users/Toni/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /Users/Toni/.rvm/gems/ruby-1.9.3-p194#rails3tutorial2ndEd/bin/ruby_noexec_wrapper:9:in `<main>'
I can’t find anything here on Stack Overflow. Any ideas?
You need to install the required gems that are used by Rails when started. Before you run rails s be sure to run bundle install or bundle update.
Make sure your Gemfile has a line that looks like: gem 'jquery-rails'
Then from your project's directory: bundle install
Because on Rubygems server, that version shows:
2.0.0 December 20, 2011 yanked

Error while trying to use warble on ChiliProject for JRuby/Jetty deployment

I'm trying to use warbler on ChiliProject (a Redmine fork, Rails 2.3 app) to deploy it in a Java Jetty web server. But when I run warble at the projects root folder, it fails with the given error message:
$ warble --trace
warble aborted!
undefined method `gems' for #<Rails::VendorGemSourceIndex:0x2e9267fe>
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:260:in `all_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:172:in `installed_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:162:in `fetch_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/index.rb:7:in `build'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:161:in `fetch_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/source.rb:70:in `specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:159:in `index'
org/jruby/RubyArray.java:1603:in `each'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:158:in `index'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/index.rb:7:in `build'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:157:in `index'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:151:in `resolve'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:90:in `specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:135:in `specs_for'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/bundler-1.0.15/lib/bundler/definition.rb:124:in `requested_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:102:in `bundler_specs'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:38:in `add_bundler_gems'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits/bundler.rb:29:in `after_configure'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits.rb:32:in `after_configure'
org/jruby/RubyArray.java:1603:in `each'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/traits.rb:32:in `after_configure'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/config.rb:172:in `initialize'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/task.rb:48:in `initialize'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/application.rb:27:in `load_rakefile'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:61:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/lib/warbler/application.rb:70:in `run'
/Users/razenha/.rvm/gems/jruby-1.6.3/gems/warbler-1.3.2/bin/warble:11:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
/Users/razenha/.rvm/gems/jruby-1.6.3/bin/warble:19:in `(root)'
I'm using JRuby 1.6.3, JDK 1.6, warbler 1.3.2 and ChiliProject 2.2.0.
At first, I sadly have to disappoint you, as we don't fully support JRuby yet. On the other hand, there are probably "only" encoding issues left to fix so if you are careful, things should work out just okay.
That said, it looks like Rails 2.3 doesn't play too well with Bundler here. If you drop the following file into lib/redmine/core_ext/vendor_gem_source_index.rb of your ChiliProject dirctory, you should be able to run warbler.
class Rails::VendorGemSourceIndex
def gems
#installed_source_index.gems.merge #vendor_source_index.gems
end
end
You still need to configure warbler to use the correct bundler groups. As warbler does it's own thing here (and as I haven't yet used warbler with bundled apps) you might need top find out how to configure this. Have a look into the Gemfile and our Bundler page for more information.
And if you are nagging enough, we might one day officially support this :) Also, more friendly people can be found in our own Forums and on IRC.

RoR Bundler problem

I installed everything from the bottom up and thought it was working fine until I ran a bundle install
Has anyone ever seen this? Any ideas? Please help. Thanks.
bundle install
Fetching source index for http://rubygems.org/
/usr/local/lib/ruby/1.9.1/rubygems/format.rb:38:in `from_file_by_path': Cannot load gem at [/usr/local/lib/ruby/gems/1.9.1/cache/rake-0.8.7.gem] in /home/ec2-user/anotherApp (Gem::Exception)
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/source.rb:73:in `fetch'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:45:in `block in run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/bin/bundle:13:in `<top (required)>'
from /usr/local/bin/bundle:19:in `load'
from /usr/local/bin/bundle:19:in `<main>'
If you install Ruby 1.9.2-x from source it still installs the gems to /usr/local/lib/ruby/gems/1.9.1/... which is a bit of a WTF (relevant). I too got this error but it can also be caused by a permissions issue. So try running the command again as root (assuming you're running into this on a *nix system). Yes, that is not ideal however you may find it works and at least you can keep on going on the path to figuring things out (and it's all in a test VM anyway, right?).
It's not recommended to use Ruby 1.9.1 with Rails. Better 1.8.7 or 1.9.2, see http://rubyonrails.org/download. Looks like you use the Debian/Ubuntu Ruby. 1.8.7 is available and usable in Debian/Ubuntu, install the ruby-full meta package via apt. Or compile Ruby 1.9.2 directly or via the Ruby Version Manager (rvm). Do not install rubygems via apt.

Resources