Spork gem installation problems

This is my gemfile from this part of the tutorial:
http://ruby.railstutorial.org/chapters/static-pages#code:gemfile_spork

source 'https://rubygems.org'

gem 'rails', '3.2.3'

group :development, :test do
    gem 'sqlite3', '1.3.5'
    gem 'rspec-rails', '2.10.0'
    gem 'guard-rspec', '0.5.5'
end

# Gems used only for assets and not required
# in production environments by default
group :assets do
    gem 'sass-rails', '3.2.4'
    gem 'coffee-rails', '3.2.2'
    gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.0'

group :test do
    gem 'rspec-rails', '2.10.0'
    gem 'capybara', '1.1.2'
    gem 'rb-inotify', '0.8.8'
    gem 'libnotify', '0.5.9'
    gem 'guard-spork', '0.3.2'
    gem 'spork', '0.9.0'
end

group :production do
    gem 'pg', '0.12.2'
end

However, installation of spork failed as it grabbed the wrong version of
cucumber:

stanley@ubuntu:/var/lib/gems/1.8/gems/spork-0.9.0/bin$ sudo bundle exec
spork[sudo] password for stanley:
Could not find gem 'cucumber (~> 1.0.0) ruby' in the gems available on
this machine.
Run `bundle install` to install missing gems.
stanley@ubuntu:/var/lib/gems/1.8/gems/spork-0.9.0/bin$ sudo gem install
cucumber
Fetching: gherkin-2.10.0.gem (100%)
Building native extensions. This could take a while...
Fetching: cucumber-1.2.0.gem (100%)

(::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile:
(::slight_smile:

Thank you for installing cucumber-1.2.0.
Please be sure to read


for important information about this release. Happy cuking!

(::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile: (::slight_smile:
(::slight_smile:

Successfully installed gherkin-2.10.0
Successfully installed cucumber-1.2.0
2 gems installed
Installing ri documentation for gherkin-2.10.0...
Installing ri documentation for cucumber-1.2.0...
Installing RDoc documentation for gherkin-2.10.0...
Installing RDoc documentation for cucumber-1.2.0...
stanley@ubuntu:/var/lib/gems/1.8/gems/spork-0.9.0/bin$ sudo bundle exec
spork
Could not find gem 'cucumber (~> 1.0.0) ruby' in the gems available on
this machine.
Run `bundle install` to install missing gems.
stanley@ubuntu:/var/lib/gems/1.8/gems/spork-0.9.0/bin$ bundle exec spork
Could not find gem 'cucumber (~> 1.0.0) ruby' in the gems available on
this machine.
Run `bundle install` to install missing gems.
stanley@ubuntu:/var/lib/gems/1.8/gems/spork-0.9.0/bin$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Using rake (0.9.2.2)
Using builder (3.0.0)
Installing columnize (0.3.6)
Using diff-lcs (1.1.3)
Using json (1.7.3)
Installing gherkin (2.4.21) with native extensions
Installing term-ansicolor (1.0.7)
Installing cucumber (1.0.6)
Installing rbx-require-relative (0.0.9)
Installing linecache (0.46) with native extensions
Using rspec-core (2.10.1)
Using rspec-expectations (2.10.0)
Using rspec-mocks (2.10.1)
Using rspec (2.10.0)
Installing ruby-debug-base (0.10.4) with native extensions
Installing ruby-debug (0.10.4)
Using bundler (1.1.3)
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!
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in
`initialize': Permission denied -
/var/lib/gems/1.8/gems/spork-0.9.0/Gemfile.lock (Errno::EACCES)
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in
`open'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in
`lock'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/environment.rb:39:in
`lock'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/installer.rb:59:in
`run'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/installer.rb:12:in
`install'
  from /var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/cli.rb:220:in
`install'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in
`send'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in
`run'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/invocation.rb:118:in
`invoke_task'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor.rb:263:in
`dispatch'
  from
/var/lib/gems/1.8/gems/bundler-1.1.3/lib/bundler/vendor/thor/base.rb:386:in
`start'
  from /var/lib/gems/1.8/gems/bundler-1.1.3/bin/bundle:13
  from /usr/local/bin/bundle:19:in `load'
  from /usr/local/bin/bundle:19

I don't know how to get around this problem knowing this observation.
How would you modify spork such that it would refer to the right version
of cucumber? Thanks in advance!

···

--
Posted via http://www.ruby-forum.com/.