Gem Conflict Running Tests Inside Sublime Text 2 -- RVM issue? - ruby-on-rails-3

Not quite sure what's changed in my setup, running tests inside Sublime Text 2 was working until recently ... Now, when I run an Rspec test from within Sublime Text 2 I get the following error.
This looks to me like an RVM issue, since I created a gemset a while ago. Any ideas?
Here's the error:
/Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:31:in `block in setup': You have already activated spork 0.9.2, but your Gemfile requires spork 0.9.0. Using bundle exec may solve this. (Gem::LoadError)
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:17:in `setup'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.3/lib/bundler.rb:107:in `setup'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#global/gems/bundler-1.1.3/lib/bundler/setup.rb:17:in `<top (required)>'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /Users/brettsanders/rails_projects/sample_app/config/boot.rb:6:in `<top (required)>'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/rails_projects/sample_app/config/application.rb:1:in `<top (required)>'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/rails_projects/sample_app/config/environment.rb:2:in `<top (required)>'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/rails_projects/sample_app/spec/spec_helper.rb:8:in `block in <top (required)>'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/spork-0.9.2/lib/spork.rb:24:in `prefork'
from /Users/brettsanders/rails_projects/sample_app/spec/spec_helper.rb:6:in `<top (required)>'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/brettsanders/rails_projects/sample_app/spec/requests/static_pages_spec.rb:1:in `<top (required)>'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `map'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/brettsanders/.rvm/gems/ruby-1.9.3-p0#rails3tutorial2ndEd/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
[Finished in 0.8s with exit code 1]
Also,
Here's 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, :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.2'
group :test do
gem 'capybara', '1.1.2'
gem 'rb-fsevent', '0.4.3.1', :require => false
gem 'growl', '1.0.3'
gem 'guard-spork', '0.3.2'
gem 'spork', '0.9.0'
end
group :production do
gem 'pg', '0.12.2'
end
# 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'

looks like you have 0.9.2 version installed and sublime text is trying to use that
either update the version of your spork in your GemFile to 0.9.2 or do
gem uninstall spork
You will be presented with options of which version to remove choose the one with 0.9.2

Related

failed enter ruby on rails console envirnment

i am new in ruby on rails. when i try this command " rails console " these errors displays :
/home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require': cannot load such file -- readline (LoadError)
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/2.1.0/irb/completion.rb:9:in `<top (required)>'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta4/lib/rails/commands/console.rb:3:in `<top (required)>'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta4/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta4/lib/rails/commands/commands_tasks.rb:58:in `console'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta4/lib/rails/commands.rb:17:in `<top (required)>'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `block in require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:252:in `require'
from /home/farnaz/workspace/sample_app/bin/rails:8:in `<top (required)>'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `block in load'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:237:in `load_dependency'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta4/lib/active_support/dependencies.rb:246:in `load'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/farnaz/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
could you help me please ?
sure, this is my gem file : source 'https://rubygems.org'
gem 'rails', '4.2.0.beta4'
gem 'bcrypt', '3.1.7'
gem 'faker', '1.4.2'
gem 'rake'
gem 'carrierwave', '0.10.0'
gem 'mini_magick', '3.8.0'
gem 'fog', '1.23.0'
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sass-rails', '5.0.0.beta1'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '4.0.0.beta2'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'arel', '6.0.0.beta2'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'unicorn', '4.8.3'
end

Rails Testing Error - NameError: TestCase::SUPPORTS_INFO_SIGNAL

In my Rails app, I've updated Ruby from 1.9.3 to 2.1.0. Now when I restart my tests I get an error:
NameError: uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
Here are gems in the Gemfile:
gem 'rails'
gem 'mysql2'
gem 'json'
gem 'jquery-rails'
gem 'kaminari'
gem 'therubyracer'
gem 'devise'
gem 'rak'
gem 'rails-translate-routes'
gem 'routes'
group :assets do
gem 'sass-rails', " ~> 3.2.3"
gem 'uglifier', ' >= 1.0.3'
end
group :development, :test do
gem 'factory_girl_rails'
end
group :test do
gem 'shoulda'
gem 'database_cleaner'
gem 'capybara'
end
Here's the stack trace:
`NameError: uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
~/.rvm/gems/ruby-2.1.0#kalender/gems/mocha-0.10.5/lib/mocha/integration/mini_test/version_230_to_262.rb:19:in `run'`
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit/testcase.rb:17:in `run'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/testing/setup_and_teardown.rb:36:in `block in run'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:425:in `_run__4401979439353622961__setup__4295356768171603498__callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:405:in `__run_callback'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:385:in `_run_setup_callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/callbacks.rb:81:in `run_callbacks'
~/.rvm/gems/ruby-2.1.0#kalender/gems/activesupport-3.2.12/lib/active_support/testing/setup_and_teardown.rb:35:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:940:in `block in _run_suite'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `map'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:933:in `_run_suite'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:663:in `block in _run_suites'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `each'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:661:in `_run_suites'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:884:in `_run_anything'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1092:in `run_tests'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1079:in `block in _run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `each'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1078:in `_run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/minitest/unit.rb:1066:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:27:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:780:in `run'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:372:in `block (2 levels) in autorun'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:33:in `run_once'
~/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/test/unit.rb:371:in `block in autorun'
I just came across a bug that is similar or identical to this one and was able to resolve it locally. For me, I had a trace that begins with:
/home/youruser/.rvm/gems/ruby-2.1.0/gems/mocha-0.10.5/lib/mocha/integration/mini_test/version_230_to_262.rb:19:in `run': uninitialized constant MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL (NameError)
This shows that the error is actually occurring in mocha when it tries to reference a constant that has been removed from the version of minitest that likely came along with your Ruby upgrade.
For me, doing a bundle update mocha fixed the problem.
Doing a bit of code spelunking to figure out specifically where the problem was fixed, I used the "git pickaxe" (git log -SSUPPORTS_INFO_SIGNAL) on a cloned copy of the mocha repository, and it seems like this commit removed the reference to SUPPORTS_INFO_SIGNAL, so using anything after that commit in mocha should be ok.
If upgrading your version of mocha doesn't solve the problem, take a close look at the stack trace and you should see which library that depends minitest having SUPPORTS_INFO_SIGNAL defined is causing the error. Then look upstream in that dependency to see if this problem was fixed. If not, fork the dependency you're using that exhibits this behavior and push your own patch upstream.

Rails 3 + Heroku: cannot load such file -- test/unit/testcase (LoadError)

I'm having the following error when running the console in heroku (heroku run console...). The application is running without problems, but I seem to be unable to run the console because of this and in development I'm not having this issue.
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- test/unit/testcase (LoadError)
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/test_case.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/console/app.rb:2:in `<top (required)>'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:236:in `load_dependency'
from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `require'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:304:in `initialize_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/application.rb:152:in `load_console'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:27:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.9/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This is my Gemfile:
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.9'
gem 'oauth', '~> 0.4.4'
gem 'twitter', '~> 1.4.1'
gem 'sendgrid'
gem 'koala'
gem 'therubyracer', '0.10.2'
gem 'execjs'
# Rails 3.1 - Asset Pipeline
gem 'json'
group :assets do
gem 'sass-rails', " >= 3.2.3"
gem 'coffee-rails', ">= 3.2.1"
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass'
end
gem 'coffee-script'
gem 'jquery-rails'
gem "fog"
gem 'bootstrap-wysihtml5-rails', '0.3.1.10'
group :production do
gem "heroku"
gem 'pg', '0.13'
gem 'newrelic_rpm'
gem 'newrelic_api'
end
group :test do
gem 'email_spec'
gem "cucumber-rails"
gem "rspec-rails"
gem "capybara"
gem 'culerity'
gem "selenium-webdriver"
gem "database_cleaner"
gem 'factory_girl_rails'
end
group :development, :grades, :test do
gem "launchy"
gem "mysql2"
gem "letter_opener"
gem "pry"
gem "rails-erd"
end
gem "airbrake"
gem "authlogic"
gem 'awesome_print'
gem 'cancan'
gem 'dalli'
#gem "oink"
gem 'validates_timeliness', '~> 3.0.2'
gem 'hpricot'
gem "ruby_parser"
gem "prawn_rails"
gem "thin"
gem "nested_form", :git => "git://github.com/ryanb/nested_form.git"
gem "meta_search"
gem "carrierwave"
gem "aws-s3"
gem "mini_magick"
gem 'will_paginate'
gem "spreadsheet"
gem "oauth-plugin", ">= 0.4.0.pre1"
gem 'flash_cookie_session'
gem 'haml-rails'
gem 'squeel'
gem 'rails_best_practices', :group => :development
gem 'simple_form'
gem 'taps', :group => :development
gem 'resque'
gem "audited-activerecord", "~> 3.0"
gem "lograge"
gem 'quiet_assets'
gem 'yajl-ruby', :require => "yajl"
gem 'switch_user'
I've got no idea why I'm getting this error. Any thoughts? Thanks
With Rails 3.1.12 and Ruby 2.2.0 I had to add
gem 'test-unit'
to my Gemfile.
Removing test in the .slugignore file works for me.
Apparently Heroku has changed the way it interprets the .slugignore file.
In my case, I had rpc directory in .slugignore and it wiped out rpc subdirectory of one of the gems my app is depending on, which resulted in LoadError. I'm unsure Heroku made this change intentionally. Regardless of whether .slugignore is working as they expect, removing affecting line(s) from .slugignore should fix the issue for now.
P.S. I've raised a support ticket to Heroku on this.
UPDATE: As per Heroku support, there were some changes to .slugignore parsing to make it more consistent with .gitignore, and it is working as intended. The right way to only delete the top level directory is putting /rpc instead.
Removing test dir from .slugignore fixed the issue
Remove test dir from .slugignore
We also ran into this issue today. I suspect something must have changed in Heroku's Ruby build pack.
For us it was a problem with prototype-rails trying to load ActionView::TestCase which in turn requires test/unit/testcase. The patch is pretty simple and is available as a fork.
If you're using Bundler, you might want something like:
gem 'prototype-rails', :git => 'git://github.com/ennova/prototype-rails.git'
I tried disabling multithreading (comment out config.threadsafe!) and that seems to work for now until heroku gets their act together.

In production mode I am getting - No such file to load -- ruby-debug (LoadError)

I am using Rails 3.2.1 and the 'ruby-debug19' line has been commented out in the Gemfile.
When I start the server in development mode, the server starts up without any problem. However, when I start my server in production mode (rails server -e production, I endup getting the following error (see stack trace below):
... `rescue in depend_on': No such file to load -- ruby-debug (LoadError)
I have spent quite bit of time trying to figure out who is requiring reby-debug without any luck. Not sure what to include except my Gemfile and the stack. I would really appreciate any help.
One more piece of info: line 5 in my environment.rb file is just calling "Application.initialize!"
Gemfile:
gem 'rails', '3.2.1'
gem 'mysql'
gem 'gravatar_image_tag', '0.1.0'
gem "devise", ">= 1.4.9"
gem "paperclip", "~> 2.0"
gem 'jquery-rails'
gem 'aws-sdk'
gem 'aws-s3', :require => 'aws/s3'
gem 'formtastic'
gem 'cancan'
gem 'kaminari'
gem 'date_validator'
gem 'simple_form'
gem 'heroku'
gem 'pg', :group => :production
# 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"
gem 'uglifier', '>= 1.0.3'
end
gem 'annotate','2.4.1.beta1', :group => :development
gem 'nifty-generators', :group => :development
gem 'rspec-rails', '2.6.1.beta1', :group => [:development, :test]
gem 'faker', '0.3.1', :group => [:development, :test]
gem 'rspec', '2.6', :group => [:test, :development]
gem 'populator', :group => [:development, :test]
#gem 'ruby-debug19', :require => 'ruby-debug', :group => [:development, :test]
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "pickle", ">=0.4.10", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "email_spec", :group => :test
gem 'guard-rspec', :group => :test
gem "mocha", :group => :test
And here is the stack trace:
➜ taskfree git:(master) ✗ bundle exec rails server -e production
=> Booting WEBrick
=> Rails 3.2.1 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport- 3.2.1/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- ruby-debug (LoadError)
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport3.2.1/lib/active_support/dependencies.rb:312:in `depend_on'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:225:in `require_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/engine.rb:438:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/engine.rb:438:in `block in eager_load!'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/engine.rb:436:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/engine.rb:436:in `eager_load!'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/bidhan/code/taskfree/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
from /Users/bidhan/code/taskfree/config.ru:4:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/bidhan/code/taskfree/config.ru:1:in `new'
from /Users/bidhan/code/taskfree/config.ru:1:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
And here is the output when I just start my server in development mode:
➜ taskfree git:(master) ✗ bundle exec rails server
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-02-17 15:09:24] INFO WEBrick 1.3.1
[2012-02-17 15:09:24] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin10.5.0]
[2012-02-17 15:09:24] INFO WEBrick::HTTPServer#start: pid=33798 port=3000
Your Gemfile.lock can help you track down which gem has ruby-debug as a dependency. Open it up and search for 'ruby-debug' and it should be nested beneath the gem that depends on it.
That said, I do notice one issue which might cause you some grief. The aws-s3 gem and the aws-sdk gems are not compatible. They both use the AWS::S3 constant, one as a module the other as a class. You get different behaviors depending on the order they are required.
Paperclip recently replace aws-s3 as a dependency with aws-sdk. You should be able to simply remove aws-s3 from your Gemfile (unless you specifically use aws-s3 outside of paperclip). If you depend on aws-s3 outside paperclip, you will want to replace those calls with equivalent calls using aws-sdk.

Unable to get Postgresql database to work with Ruby on Rails 3

Environment
Windows 7 64 bit
Ruby 1.8.7
Rails 3.0.0
pg AdminIII
PostgreSQL 9.0.3
Cygwin
Gemfile
http://i54.tinypic.com/27yzxv4.png
Database Config
http://i53.tinypic.com/288b7ma.png
Steps I have taken
I tried addding "gem 'postgres-pr', :require => 'pg'" to the gemfile
Have tried installing multiple variations of the postgres gem,
postgres-pr
pg
ruby-pg
I continually get this error when trying to run rake db:migrate
rake aborted!
no such file to load -- pg
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in `require'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `each'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in `require'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `each'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in `require'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler.rb:120:in `require'
/home/Other/rails_projects/test_project/config/application.rb:7
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/home/Other/rails_projects/test_project/Rakefile:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Been at this for a couple days, really need some help. Thanks in advance!
You need to specify the correct platform for the gem. In my Gemfile, I have:
group :development, :test do
gem 'pg', :platforms => :mingw
end
(The group is there because I deploy to a Unix box, where the platform is obviously different). I seem to remember that I also needed the DevKit for this to work.
You need to install pg and add to your Gemfile
gem 'pg'
You may need to upgrade your version of Rails to 3.0.1 - 3.0.9 and also run gem install pg. Then just for good measure re-run bundle install.