can't use bundle install - ruby-on-rails

I'm experiencing some difficulties when using the command: "bundle install". It's probably some kind of a trivial issue, but I would appreciate any help you can give. I am using linux ubuntu 11.04, ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]
The error message I get is this :
/var/www/hw2_rottenpotatoes$ bundle install
Using rake (0.9.2.2)
Using multi_json (1.0.4)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.5)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.3)
Using actionpack (3.1.0)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.31)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using bundler (1.1.3)
Using coffee-script-source (1.2.0)
Using execjs (1.2.13)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.3)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.1.0)
Using coffee-rails (3.1.1)
Using haml (3.1.4)
Using jquery-rails (1.0.19)
Using libv8 (3.3.10.4)
Using pg (0.13.1)
Using rails (3.1.0)
Using sass (3.1.12)
Using sass-rails (3.1.5)
Using sqlite3 (1.3.5)
Using therubyracer (0.9.9)
Using uglifier (1.2.2)
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!
/home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in `initialize': Permission denied - /var/www/hw2_rottenpotatoes/Gemfile.lock (Errno::EACCES)
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in `open'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/definition.rb:246:in `lock'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/environment.rb:39:in `lock'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/installer.rb:59:in `run'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/installer.rb:12:in `install'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/cli.rb:220:in `install'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/lib/bundler/vendor/thor/base.rb:386:in `start'
from /home/n/.rvm/gems/ruby-1.9.3-p125/gems/bundler-1.1.3/bin/bundle:13:in `<top (required)>'
from /home/n/.rvm/gems/ruby-1.9.3-p125/bin/bundle:19:in `load'
from /home/n/.rvm/gems/ruby-1.9.3-p125/bin/bundle:19:in `<main>
my Gemfile is :
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# for Heroku deployment - as described in Ap. A of ELLS book
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'therubyracer'
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
gem 'haml'
and my Gemfile.lock is :
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
archive-tar-minitar (0.5.2)
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
columnize (0.3.5)
erubis (2.7.0)
execjs (1.2.13)
multi_json (~> 1.0)
haml (3.1.4)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.3)
libv8 (3.3.10.4)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
pg (0.13.1)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
therubyracer (0.9.9)
libv8 (~> 3.3.10)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
uglifier (1.2.2)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
coffee-rails (~> 3.1.0)
haml
jquery-rails
pg
rails (= 3.1.0)
ruby-debug19
sass-rails (~> 3.1.0)
sqlite3
therubyracer
uglifier

Looks like bundler doesn't have rights to access Gemfile and/or Gemfile.lock make sure the permissions are right on those files.

Being on Ubuntu, you might want to work on your app in /home/<username>/ where you should have more permissions.
If you are working in the /var/ directory, you might need to use sudo everywhere.

Related

Rake resque:workers command forks infinite processes

I have a rails project, which uses resque workers, with a Gemfile like this:
source 'https://rubygems.org'
gem 'rails', '3.2.5'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'rest-open-uri'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'therubyracer' # If using Ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'less-rails-bootstrap'
gem 'devise'
gem 'net-http-digest_auth', '1.2.1'
gem "resque", :require => "resque/server"
gem 'carrierwave'
gem 'kaminari'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
After I do a bundle install and try to start some resque workers with the command rake resque:work QUEUE=checker_queue or bundle exec rake resque:work QUEUE=checker_queue my machine stops responding (to anything). When I observe the system with htop I see that rake creates new processes until both memory and swap space of the machine is full (at which point machine becomes unresponsive).
Any ideas regardind the cause of this strange behaviour?
Redis version:
# redis-server -v
Redis server version 2.2.12 (00000000:0)
Ruby version:
# ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.15)
actionpack (= 3.2.15)
mail (~> 2.5.4)
actionpack (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.15)
activesupport (= 3.2.15)
builder (~> 3.0.0)
activerecord (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.15)
activemodel (= 3.2.15)
activesupport (= 3.2.15)
activesupport (3.2.15)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
arel (3.0.2)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
builder (3.0.4)
carrierwave (0.9.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
commonjs (0.2.7)
devise (3.1.1)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
i18n (0.6.5)
journey (1.0.4)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
less (2.4.0)
commonjs (~> 0.2.7)
less-rails (2.4.2)
actionpack (>= 3.1)
less (~> 2.4.0)
less-rails-bootstrap (3.0.4)
less-rails (~> 2.4.2)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25)
mono_logger (1.1.0)
multi_json (1.8.2)
net-http-digest_auth (1.2.1)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-protection (1.5.1)
rack
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.2.15)
actionmailer (= 3.2.15)
actionpack (= 3.2.15)
activerecord (= 3.2.15)
activeresource (= 3.2.15)
activesupport (= 3.2.15)
bundler (~> 1.0)
railties (= 3.2.15)
railties (3.2.15)
actionpack (= 3.2.15)
activesupport (= 3.2.15)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
redis (3.0.5)
redis-namespace (1.3.2)
redis (~> 3.0.4)
ref (1.0.5)
resque (1.25.1)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
rest-open-uri (1.0.0)
sass (3.2.12)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.8)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.38)
uglifier (2.3.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
vegas (0.1.11)
rack (>= 1.0.0)
warden (1.2.3)
rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
carrierwave
coffee-rails (~> 3.2.1)
devise
jquery-rails
kaminari
less-rails-bootstrap
net-http-digest_auth (= 1.2.1)
rails (= 3.2.15)
resque
rest-open-uri
sass-rails (~> 3.2.3)
sqlite3
therubyracer
uglifier (>= 1.0.3)
Maybe there is a bug in app code that schedules resque jobs or maybe there are lots of jobs pending or maybe the problem lies in the task itself. In any case also try to inspect resque status:
Resque.info
Resque.size :medium
Maybe it will help identify the problem

Bundle install doesnt install gem in Gemfile

I am typing the following command:
rake -RAILS_ENV=production db:schema:load
In the home directory of my rails app on my production server and I get the following error message:
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
This is strange because I know that pg is in my Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :production do
gem 'pg'
gem 'devise'
gem 'haml-rails'
gem 'paperclip'
gem 'will_paginate'
end
group :development do
gem 'capistrano'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
And when I run bundle install from that directory I get the following output (pg is not on it.):
Fetching gem metadata from https://rubygems.org/.......
Using rake (0.9.2.2)
Using i18n (0.6.1)
Using multi_json (1.3.6)
Using activesupport (3.2.8)
Using builder (3.0.0)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using cocaine (0.2.1)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.5)
Using rdoc (3.12)
Using thor (0.16.0)
Using railties (3.2.8)
Using coffee-rails (3.2.2)
Using orm_adapter (0.4.0)
Using warden (1.2.1)
Using devise (2.1.2)
Using haml (3.1.7)
Using haml-rails (0.3.4)
Using jquery-rails (2.1.1)
Using paperclip (3.1.2)
Using bundler (1.2.1)
Using rails (3.2.8)
Using sass (3.2.1)
Using sass-rails (3.2.5)
Using uglifier (1.2.7)
Using will_paginate (3.0.3)
Your bundle is complete! It was installed into /usr/local/lib
And my Gemfile.lock if it's relevant (pg is listed as a dependency only):
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.8)
actionpack (= 3.2.8)
mail (~> 2.4.4)
actionpack (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
activerecord (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1-x86-mingw32)
builder (3.0.0)
capistrano (2.12.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
devise (2.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
haml (3.1.7)
haml-rails (0.3.4)
actionpack (~> 3.0)
activesupport (~> 3.0)
haml (~> 3.0)
railties (~> 3.0)
highline (1.6.13)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.1)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
json (1.7.5)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.3.6)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.5.2)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
orm_adapter (0.4.0)
paperclip (3.1.2)
activemodel (>= 3.0.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (>= 0.0.2)
mime-types
pg (0.14.0-x86-mingw32)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.8)
actionmailer (= 3.2.8)
actionpack (= 3.2.8)
activerecord (= 3.2.8)
activeresource (= 3.2.8)
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.2.8)
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
uglifier (1.2.7)
execjs (>= 0.3.0)
multi_json (~> 1.3)
warden (1.2.1)
rack (>= 1.0)
will_paginate (3.0.3)
PLATFORMS
x86-mingw32
DEPENDENCIES
capistrano
coffee-rails (~> 3.2.1)
devise
haml-rails
jquery-rails
paperclip
pg
rails (= 3.2.8)
sass-rails (~> 3.2.3)
uglifier (>= 1.0.3)
will_paginate
Contents of .bundle/config:
BUNDLE_FROZEN: '1'
BUNDLE_PATH: /usr/local/lib/
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_WITHOUT: development:test
I am using
- rails 3.2.8
- ruby 1.9.3
- rvm 1.16.5
Can anyone offer an explanation as to why bundle install is not installing all the gems listed in my Gemfile?
Through some detective work I found out the following factors contributed to my problem:
1) I was developing on a Windows machine that installed the windows-specific version of the gem pg: (0.14.0-x86-mingw32).
2) This was then added to my Gemfile.lock and consequently my repo that capistrano then used to install my app on a Debian box with; pg was listed as a dependency, only.
3) capistrano was running bundler with the "--deployment" flag, which requires your Gemfile.lock to be up-to-date and accurate.
How I resolved the problem was removed the "--deployment" flag from capistrano with the following variable definition in deploy.rb:
set :bundle_flags, "--quiet"
require 'bundler/capistrano'
And ran the cap deploy:update again.
Still working on a way to have the Gemfile.lock reflect that pg should be installed on the production environment, while pg should be installed on the development machine so I can include the --deployment option back into the deployment task.
You have to use bundler to execute rake:
bundle exec rake db:schema:load RAILS_ENV=production
For the database.yml
it should be
development:
adapter: postgresql
encoding: utf8
database: xxx
host: localhost
username: username
password: pw
the adapter for postgresql is postgresql
And for the gem file, make sure pg is there
and you don't need a block if it exist in both development and production

deploying to heroku keeps installing sqlite3, but no sqlite3 as dependency in gemfile.lock, and no sqlite3 in gemfile

I know that I can't have sqlite3 when I deploy to heroku (I have used it in development, but since then deleted it.
jeffrey#ubuntu5:~/Documents/Sites/burma_project$ bundle show sqlite3
Could not find gem 'sqlite3' in the current bundle.
Also in my gemfile, there's no sqlite3 there
gem 'rails', '3.1.1'
gem 'activeadmin'
gem 'builder'
gem 'delayed_job_active_record'
gem 'daemons'
gem 'twilio-ruby'
gem 'whenever', :require=> false
gem 'gravatar_image_tag', '1.0.0.pre2'
group :assets do
gem 'sass-rails', '~> 3.1.4'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
group :development do
gem 'rspec-rails', '2.6.1'
gem 'annotate', '2.4.0'
# gem 'sqlite3', '1.3.4'
# gem 'localtunnel'
end
group :production do
#gem 'therubyracer-heroku', '0.8.1.pre3'
gem 'pg'
end
gem 'jquery-rails'
group :test do
# Pretty printed test output
gem 'turn', :require => false
gem 'rspec-rails', '2.6.1'
gem 'webrat', '0.7.1'
gem 'spork', '0.9.0.rc8'
gem 'factory_girl_rails', '1.0'
end
Also in my gemfile.lock, I did control+f and could not find any gem that depended on sqlite3
Here is my gemfile.lock
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activeadmin (0.3.4)
devise (>= 1.1.2)
fastercsv
formtastic (< 2.0.0)
inherited_resources (< 1.3.0)
kaminari (>= 0.12.4)
meta_search (>= 0.9.2)
rails (>= 3.0.0)
sass (>= 3.1.0)
activemodel (3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
multi_json (~> 1.0)
annotate (2.4.0)
ansi (1.4.1)
arel (2.2.1)
bcrypt-ruby (3.0.1)
bcrypt-ruby (3.0.1-x86-mingw32)
builder (3.0.0)
chronic (0.6.7)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.2.0)
daemons (1.1.8)
delayed_job (3.0.1)
activesupport (~> 3.0)
delayed_job_active_record (0.3.2)
activerecord (> 2.1.0)
delayed_job (~> 3.0.0)
devise (1.5.3)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.13)
multi_json (~> 1.0)
factory_girl (1.3.3)
factory_girl_rails (1.0)
factory_girl (~> 1.3)
rails (>= 3.0.0.beta4)
fastercsv (1.5.4)
formtastic (1.2.4)
actionpack (>= 2.3.7)
activesupport (>= 2.3.7)
i18n (~> 0.4)
gravatar_image_tag (1.0.0.pre2)
has_scope (0.5.1)
hike (1.2.1)
i18n (0.6.0)
inherited_resources (1.2.2)
has_scope (~> 0.5.0)
responders (~> 0.6.0)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.4)
jwt (0.1.4)
json (>= 1.2.4)
kaminari (0.13.0)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta_search (1.1.1)
actionpack (~> 3.1.0)
activerecord (~> 3.1.0)
activesupport (~> 3.1.0)
polyamorous (~> 0.5.0)
mime-types (1.17.2)
multi_json (1.0.4)
nokogiri (1.5.0)
nokogiri (1.5.0-x86-mingw32)
orm_adapter (0.0.6)
pg (0.13.2)
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.1)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
responders (0.6.4)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rspec-rails (2.6.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
sass (3.1.12)
sass-rails (3.1.5)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (~> 3.1.10)
tilt (~> 1.3.2)
spork (0.9.0.rc8)
spork (0.9.0.rc8-x86-mingw32)
win32-process
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
turn (0.8.3)
ansi
twilio-ruby (3.5.1)
builder (>= 2.1.2)
jwt (>= 0.1.2)
multi_json (>= 1.0.3)
tzinfo (0.3.31)
uglifier (1.2.1)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.1.0)
rack (>= 1.0)
webrat (0.7.1)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
whenever (0.7.2)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
win32-api (1.4.8-x86-mingw32)
win32-process (0.6.5)
windows-pr (>= 1.1.2)
windows-api (0.4.0)
win32-api (>= 1.4.5)
windows-pr (1.2.1)
win32-api (>= 1.4.5)
windows-api (>= 0.3.0)
PLATFORMS
ruby
x86-mingw32
DEPENDENCIES
activeadmin
annotate (= 2.4.0)
builder
coffee-rails (~> 3.1.1)
daemons
delayed_job_active_record
factory_girl_rails (= 1.0)
gravatar_image_tag (= 1.0.0.pre2)
jquery-rails
pg
rails (= 3.1.1)
rspec-rails (= 2.6.1)
sass-rails (~> 3.1.4)
spork (= 0.9.0.rc8)
turn
twilio-ruby
uglifier (>= 1.0.3)
webrat (= 0.7.1)
whenever
Yet, when I do git push heroku master, I get
Installing sqlite3 (1.3.4) with native extensions 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. Thanks!
And as you can see, disaster strikes.
Ok, that's it. If you can help me, I will be oh so happy.
Jeff
try the following:
Open database.yml & verify that adapter is NOT sqlite3 for development,test & production.
try running the following commands
$ bundle install #this would regenerate your gemfile.lock
$ rake db:create
$ rake db:scheme:load
$ rake db:migrate
3.now try deployment again, if it doesn't still work. run heroku logs & post back the results

Rails 3.1.1 deploy to Heroku failing

After upgrading my Rails 3.0.9 app to 3.1.1, I'm getting the following bundler error when pushing to Heroku-cedar stack:
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc
Running: bundle install --without development:test --path vendor/bundle
Updating git://github.com/sferik/rails_admin.git
Fetching gem metadata from http://rubygems.org/........
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails_admin (>= 0) ruby depends on
rails (~> 3.1) ruby
rails (3.0.9)
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:[app].git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:[app].git'
I was originally using Bundler 1.0.21 but noticed that Heroku is using 1.1.rc so I removed 1.0.21 from my gemset, installed 1.1.rc, and re-generated my gemfile.lock.
I've tried deleting gemfile.lock and re-generating it with bundle update/bundle install, and have tried removing the rails_admin gem from the gemfile. I have also tried completely emptying my gemset and reinstalling all the gems.
My gemfile looks like:
source 'http://rubygems.org'
gem 'rails', '>= 3.1.1'
gem 'pg'
group :assets do
gem 'sass-rails', "~>3.1.4"
gem 'coffee-rails', "~>3.1.0"
gem 'uglifier'
end
gem 'devise'
gem 'cancan'
gem 'rake', '>= 0.9.2.2'
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
gem 'jquery-rails', '>= 1.0.12'
# haml added to make heroku-cedar happy
gem 'haml'
gem 'formtastic', '>= 1.2.3'
gem 'tabs_on_rails'
gem 'acts_as_list'
gem 'acts-as-taggable-on'
gem 'best_in_place'
# fastercsv added to make heroku-cedar happy
gem 'fastercsv'
gem 'event-calendar', :require => 'event_calendar'
gem 'date_validator'
gem 'nested_form', :git => 'git://github.com/ryanb/nested_form.git'
gem 'will_paginate', '>= 3.0.pre4'
gem 'heroku'
# Google analytics gem
group :production do
gem 'thin'
gem 'rack-google_analytics', :require => "rack/google_analytics"
end
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
gem "rspec-rails", ">= 2.6.1", :group => [:test, :development]
group :test do
gem 'factory_girl_rails'
gem 'webrat'
gem 'guard-rspec'
end
and gemfile.lock:
GIT
remote: git://github.com/ryanb/nested_form.git
revision: 57f32788f1952bcd633057b4b56b69b51df17610
specs:
nested_form (0.1.1)
GIT
remote: git://github.com/sferik/rails_admin.git
revision: e99d7f8e9002ae7c6b4dddb962174e76f8663400
specs:
rails_admin (0.0.1)
bootstrap-sass (~> 1.4)
builder (~> 3.0)
coffee-rails (~> 3.1)
haml (~> 3.1)
jquery-rails (= 1.0.16)
kaminari (~> 0.12.4)
rails (~> 3.1)
remotipart (= 1.0)
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
multi_json (~> 1.0)
acts-as-taggable-on (2.1.1)
rails
acts_as_list (0.1.4)
addressable (2.2.6)
arel (2.2.1)
bcrypt-ruby (3.0.1)
best_in_place (1.0.1)
jquery-rails
rails (~> 3.1.0)
bootstrap-sass (1.4.0)
sass-rails (~> 3.1.0)
builder (3.0.0)
cancan (1.6.7)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.2)
daemons (1.1.4)
date_validator (0.6.2)
activemodel (>= 3.0.0, < 3.2.0)
devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.3)
erubis (2.7.0)
event-calendar (2.3.3)
eventmachine (0.12.10)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (2.2.0)
activesupport
factory_girl_rails (1.3.0)
factory_girl (~> 2.2.0)
railties (>= 3.0.0)
fastercsv (1.5.4)
formtastic (2.0.2)
rails (~> 3.0)
guard (0.8.8)
thor (~> 0.14.6)
guard-rspec (0.5.2)
guard (>= 0.8.4)
haml (3.1.3)
heroku (2.11.1)
launchy (>= 0.3.2)
rest-client (~> 1.6.1)
rubyzip
term-ansicolor (~> 1.0.5)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
kaminari (0.12.4)
rails (>= 3.0.0)
launchy (2.0.5)
addressable (~> 2.2.6)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
nokogiri (1.5.0)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
rack-google_analytics (1.0.2)
rack
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
remotipart (1.0)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.7.0)
rubyzip (0.9.4)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
tabs_on_rails (2.0.2)
term-ansicolor (1.0.7)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.30)
uglifier (1.0.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.6)
rack (>= 1.0)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
will_paginate (3.0.2)
PLATFORMS
ruby
DEPENDENCIES
acts-as-taggable-on
acts_as_list
best_in_place
cancan
coffee-rails (~> 3.1.0)
date_validator
devise
event-calendar
factory_girl_rails
fastercsv
formtastic (>= 1.2.3)
guard-rspec
haml
heroku
jquery-rails (>= 1.0.12)
nested_form!
pg
rack-google_analytics
rails (>= 3.1.1)
rails_admin!
rake (>= 0.9.2.2)
rspec-rails (>= 2.6.1)
sass-rails (~> 3.1.4)
tabs_on_rails
thin
uglifier
webrat
will_paginate (>= 3.0.pre4)
gemfile.lock after commenting out rails_admin and bundle update / bundle install:
GIT
remote: git://github.com/ryanb/nested_form.git
revision: 57f32788f1952bcd633057b4b56b69b51df17610
specs:
nested_form (0.1.1)
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.1)
actionpack (= 3.1.1)
mail (~> 2.3.0)
actionpack (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.1)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.2)
activemodel (3.1.1)
activesupport (= 3.1.1)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.1)
activemodel (= 3.1.1)
activesupport (= 3.1.1)
activesupport (3.1.1)
multi_json (~> 1.0)
acts-as-taggable-on (2.1.1)
rails
acts_as_list (0.1.4)
addressable (2.2.6)
arel (2.2.1)
bcrypt-ruby (3.0.1)
best_in_place (1.0.1)
jquery-rails
rails (~> 3.1.0)
builder (3.0.0)
cancan (1.6.7)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
railties (~> 3.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.1.2)
daemons (1.1.4)
date_validator (0.6.2)
activemodel (>= 3.0.0, < 3.2.0)
devise (1.4.9)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.0.3)
diff-lcs (1.1.3)
erubis (2.7.0)
event-calendar (2.3.3)
eventmachine (0.12.10)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (2.2.0)
activesupport
factory_girl_rails (1.3.0)
factory_girl (~> 2.2.0)
railties (>= 3.0.0)
fastercsv (1.5.4)
formtastic (2.0.2)
rails (~> 3.0)
guard (0.8.8)
thor (~> 0.14.6)
guard-rspec (0.5.2)
guard (>= 0.8.4)
haml (3.1.3)
heroku (2.11.1)
launchy (>= 0.3.2)
rest-client (~> 1.6.1)
rubyzip
term-ansicolor (~> 1.0.5)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.16)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
launchy (2.0.5)
addressable (~> 2.2.6)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.3)
nokogiri (1.5.0)
orm_adapter (0.0.5)
pg (0.11.0)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack (>= 0.4)
rack-google_analytics (1.0.2)
rack
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.1)
actionmailer (= 3.1.1)
actionpack (= 3.1.1)
activerecord (= 3.1.1)
activeresource (= 3.1.1)
activesupport (= 3.1.1)
bundler (~> 1.0)
railties (= 3.1.1)
railties (3.1.1)
actionpack (= 3.1.1)
activesupport (= 3.1.1)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.11)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.7.0)
rspec-core (~> 2.7.0)
rspec-expectations (~> 2.7.0)
rspec-mocks (~> 2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.7.0)
rubyzip (0.9.4)
sass (3.1.10)
sass-rails (3.1.4)
actionpack (~> 3.1.0)
railties (~> 3.1.0)
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
sprockets (2.0.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
tabs_on_rails (2.0.2)
term-ansicolor (1.0.7)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.30)
uglifier (1.0.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
warden (1.0.6)
rack (>= 1.0)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
will_paginate (3.0.2)
PLATFORMS
ruby
DEPENDENCIES
acts-as-taggable-on
acts_as_list
best_in_place
cancan
coffee-rails (~> 3.1.0)
date_validator
devise
event-calendar
factory_girl_rails
fastercsv
formtastic (>= 1.2.3)
guard-rspec
haml
heroku
jquery-rails (>= 1.0.12)
nested_form!
pg
rack-google_analytics
rails (>= 3.1.1)
rake (>= 0.9.2.2)
rspec-rails (>= 2.6.1)
sass-rails (~> 3.1.4)
tabs_on_rails
thin
uglifier
webrat
will_paginate (>= 3.0.pre4)
In the end I resolved this by deleting my .git directory, initialized a new repo with git init and re-committed everything. Not ideal, but the only way I could solve this.

Cucumber failing to work after bundle update

After running bundle update I have suddenly found that my cucumber tests are failing to get going.
Running cucumber features gives me:
$ cucumber features
Using the default profile...
uninitialized constant ActiveRecord (NameError)
/Library/Ruby/Gems/1.8/gems/rspec-expectations-2.3.0/lib/rspec/expectations/backward_compatibility.rb:6:in `const_missing'
/Library/Ruby/Gems/1.8/gems/default_value_for-1.0.1/lib/rails.rb:23
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Library/Ruby/Gems/1.8/gems/cucumber-rails-0.4.1/lib/cucumber/rails.rb:1
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
/Users/petenixey/Rails_apps/kind-advice/features/support/env.rb:7
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/rb_support/rb_language.rb:143:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:176:in `load_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:78:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:77:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime/support_code.rb:77:in `load_files!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime.rb:137:in `load_step_definitions'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/runtime.rb:39:in `run!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/../lib/cucumber/cli/main.rb:20:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-0.10.2/bin/cucumber:14
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
I have tried "reinstalling" Cucumber using
rails generate cucumber:install
However this doesn't seem to have any effect.
My gemfile is:
source :rubygems
source "http://rubygems.org"
gem "rails", "~>3.0.3"
gem "sqlite3-ruby", :require => "sqlite3"
gem "hoptoad_notifier"
gem "pony"
gem "default_value_for"
gem "authlogic"
gem 'jquery-rails', '>= 0.2.6'
gem "rake"
group :development, :test do
gem "faker"
gem "launchy"
gem "test-unit"
gem "autotest"
gem "autotest-growl"
gem "autotest-rails-pure"
gem "autotest-fsevent"
gem "factory_girl_rails"
gem "rspec-rails", "~> 2.3.0"
gem "ruby-debug"
gem "capybara", "0.3.9"
gem "webrat"
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'metric_fu'
end
And my gemfile.lock is:
GEM
remote: http://rubygems.org/
remote: http://rubygems.org/
specs:
Saikuro (1.1.0)
ZenTest (4.5.0)
abstract (1.0.0)
actionmailer (3.0.7)
actionpack (= 3.0.7)
mail (~> 2.2.15)
actionpack (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.5.0)
rack (~> 1.2.1)
rack-mount (~> 0.6.14)
rack-test (~> 0.5.7)
tzinfo (~> 0.3.23)
activemodel (3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
arel (~> 2.0.2)
tzinfo (~> 0.3.23)
activeresource (3.0.7)
activemodel (= 3.0.7)
activesupport (= 3.0.7)
activesupport (3.0.7)
arel (2.0.9)
arrayfields (4.7.4)
authlogic (2.1.6)
activesupport
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.5)
sys-uname
autotest-growl (0.2.9)
autotest-rails-pure (4.1.2)
builder (2.1.2)
capybara (0.3.9)
culerity (>= 0.2.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.3)
childprocess (0.1.8)
ffi (~> 1.0.6)
chronic (0.3.0)
churn (0.0.13)
chronic (>= 0.2.3)
hirb
json_pure
main
ruby_parser (~> 2.0.4)
sexp_processor (~> 3.0.3)
colored (1.2)
columnize (0.3.2)
configuration (1.2.0)
cucumber (0.10.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
gherkin (>= 2.3.5)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
cucumber-rails (0.4.1)
cucumber (>= 0.10.1)
nokogiri (>= 1.4.4)
rack-test (>= 0.5.7)
culerity (0.2.15)
database_cleaner (0.6.6)
default_value_for (1.0.1)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
railties (>= 3.0.0)
faker (0.9.5)
i18n (~> 0.4)
fattr (2.2.0)
ffi (1.0.7)
rake (>= 0.8.7)
flay (1.4.2)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
flog (2.5.1)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
gherkin (2.3.6)
json (>= 1.4.6)
haml (3.0.25)
hirb (0.4.3)
hoptoad_notifier (2.4.9)
activesupport
builder
i18n (0.5.0)
jquery-rails (0.2.7)
rails (~> 3.0)
thor (~> 0.14.4)
json (1.5.1)
json_pure (1.5.1)
launchy (0.4.0)
configuration (>= 0.0.5)
rake (>= 0.8.1)
linecache (0.43)
mail (2.2.17)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
main (4.4.0)
arrayfields (>= 4.7.4)
fattr (>= 2.1.0)
metric_fu (2.1.1)
Saikuro (>= 1.1.0)
activesupport (>= 2.0.0)
chronic (~> 0.3.0)
churn (>= 0.0.7)
flay (>= 1.2.1)
flog (>= 2.3.0)
rails_best_practices (>= 0.6.4)
rcov (>= 0.8.3.3)
reek (>= 1.2.6)
roodi (>= 2.1.0)
syntax
mime-types (1.16)
nokogiri (1.4.4)
polyglot (0.3.1)
pony (1.1)
mail (> 2.0)
rack (1.2.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rails (3.0.7)
actionmailer (= 3.0.7)
actionpack (= 3.0.7)
activerecord (= 3.0.7)
activeresource (= 3.0.7)
activesupport (= 3.0.7)
bundler (~> 1.0)
railties (= 3.0.7)
rails_best_practices (0.7.5)
activesupport
colored (~> 1.2)
erubis (~> 2.6.6)
haml (~> 3.0.18)
i18n
ruby-progressbar (~> 0.0.9)
ruby_parser (~> 2.0.4)
railties (3.0.7)
actionpack (= 3.0.7)
activesupport (= 3.0.7)
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.8.7)
rcov (0.9.9)
reek (1.2.8)
ruby2ruby (~> 1.2)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
roodi (2.1.0)
ruby_parser
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
rspec-rails (2.3.1)
actionpack (~> 3.0)
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.3.0)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4)
linecache (>= 0.3)
ruby-progressbar (0.0.10)
ruby2ruby (1.2.5)
ruby_parser (~> 2.0)
sexp_processor (~> 3.0)
ruby_parser (2.0.6)
sexp_processor (~> 3.0)
rubyzip (0.9.4)
selenium-webdriver (0.1.4)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
json_pure
rubyzip
sexp_processor (3.0.5)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
syntax (1.0.0)
sys-uname (0.8.5)
term-ansicolor (1.0.5)
test-unit (2.3.0)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.26)
webrat (0.7.3)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
PLATFORMS
ruby
DEPENDENCIES
authlogic
autotest
autotest-fsevent
autotest-growl
autotest-rails-pure
capybara (= 0.3.9)
cucumber-rails
database_cleaner
default_value_for
factory_girl_rails
faker
hoptoad_notifier
jquery-rails (>= 0.2.6)
launchy
metric_fu
pony
rails (~> 3.0.3)
rake
rspec-rails (~> 2.3.0)
ruby-debug
sqlite3-ruby
test-unit
webrat
I've tried removing all of the code in my cucumber files to see if they're affecting things but it makes not difference. I'm at a loss as to how to fix this.
I finally discovered the issue here.
Since the problem appeared after a bundle update I eventually figured out that it probably wasn't my code causing the issue.
I tried doing a fresh rails install with the new set of gems and sure enough I got the same problem.
One by one I went through and tried removing gems to see if it made a difference. Finally I uninstalled the default_value_for 1.0.1 gem and everything started to run again.
For some reason there was a conflict between default_value_for 1.0.1 and something in the latest RSpec gem. I reported this as a bug on the default_value_for github repository so this may no longer be an issue but I have not tried reinstalling it yet.

Resources