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
Related
I use Rails. 3.2.16, with Rspec.
Recently when I run rails console I get the following error:
.rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/minitest/unit.rb:28:in `const_missing': uninitialized constant MiniTest::Test (NameError)
from .rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/test/unit/testcase.rb:8:in `<module:Unit>'
from .rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/test/unit/testcase.rb:4:in `<module:Test>'
from .rbenv/versions/2.0.0-p353/lib/ruby/2.0.0/test/unit/testcase.rb:3:in `<top (required)>'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-3.2.16/lib/active_support/test_case.rb:1:in `<top (required)>'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/console/app.rb:2:in `<top (required)>'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/application.rb:312:in `initialize_console'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/application.rb:152:in `load_console'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands/console.rb:27:in `start'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands/console.rb:8:in `start'
from .rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/railties-3.2.16/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
When I run rails server there are no problems.
Since I use Rspec, I don't have minitest in my Gemfile. However when I run gem list I can see:
minitest (5.3.3, 5.3.2, 4.7.5, 4.3.2)
And I am not sure why this suddenly happens.
Additional note
#user3364461 may have a related issue:
With RVM and last bundler (1.6.2) ruby 2.1.1, and rails 4.1. Happen
when I've updated some gem (Axlsx-rails, minitest, arel) If I force
minitest 5.3.2, it's the same bug with arel :
Could not find minitest-5.3.3 in any of the sources Run bundle install
to install missing gems.
First time question here forgive me if I am not descriptive. Running Ruby 1.8.7 w/ rails 2.3.5 If I run any rails or rake task I get
/home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup': undefined method `name' for #<Array:0x7f45a2fe73a8> (NoMethodError)
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `map'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `each'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `map'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:75:in `setup'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:114:in `check'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:121
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/mathew/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/rubygems-bundler-1.4.2/lib/rubygems_executable_plugin.rb:4
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `call'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:50:in `run'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `each'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#global/gems/executable-hooks-1.2.6/lib/executable-hooks/hooks.rb:49:in `run'
from /home/mathew/.rvm/gems/ruby-1.8.7-p374#wholesale/bin/ruby_executable_hooks:10
my gem list is:
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
atomic (1.1.14)
bcrypt-ruby (3.1.2)
bundler (1.3.5)
bundler-unload (1.0.2)
daemons (1.0.10)
delayed_job (2.0.4)
executable-hooks (1.2.6)
hpricot (0.8.4)
i18n (0.6.5, 0.5.0)
json (1.8.1)
minitest (4.7.5)
multi_json (1.8.2)
mysql (2.8.1)
nokogiri (1.4.1)
rack (1.5.2, 1.0.1)
rails (2.3.5)
rake (10.1.0, 0.9.2.2)
rdoc (4.0.1)
rubygems-bundler (1.4.2)
rubygems-update (2.1.10, 1.8.25)
rvm (1.11.3.8)
thread_safe (0.1.3)
tzinfo (0.3.38)
From what I have read bcrypt-ruby and bundler don't play nice together. So I tried to uninstall bundler and rubygems-bundler (because rubygems-bundler is in the error output) but they don't seem to be uninstalled when I run gem list :/ Any help would be appreciated. Thanks!
Seems duplicated with: Rails 2.3.14 not working and the answer there was: Remove bundle from global gemset
$ rvm #global
$ gem uninstall bundler
For those coming from a search engine: In my case, with rubygems 3.1.1 and bundler 2.1.0, the issue was still having rubygems-bundler installed.
Traceback (most recent call last):
6: from /Users/myuser/.rvm/gems/ruby-2.6.3#timing/bin/ruby_executable_hooks:10:in `<main>'
5: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
4: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
3: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
2: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
1: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- rubygems-bundler/noexec (LoadError)
10: from /Users/myuser/.rvm/gems/ruby-2.6.3#timing/bin/ruby_executable_hooks:10:in `<main>'
9: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
8: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
7: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
6: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
5: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:156:in `require'
4: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
3: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:168:in `require'
2: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
1: from /Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124:in `check'
/Users/myuser/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84:in `setup': undefined method `plain_specs' for #<Bundler::RubygemsIntegration:0x00007f90bf0cb3e8> (NoMethodError)
Looking into the situation, the readme has this to say:
Generally, this gem is not needed on RubyGems >= 2.2.0.
The solution was to remove that gem from the #global gemset:
rvm #global
gem uninstall rubygems-bundler
The problem:
I have this gem that I am working on. While trying to install it locally to do some tests, rake install fails after building the gem. Rake suggested that I run gem install for the built gem to debug. Surprisingly, gem install pkg/my_gem-x.y.z.gem works like a charm!
Any idea why?
Some details:
rake version: 10.0.3
Gem created using bundler version: 1.2.1
Contents of gemspec:
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'my_gem/version'
Gem::Specification.new do |gem|
gem.name = "mygem"
gem.version = MyGem::VERSION
gem.authors = ["Omar Abdel-Wahab"]
gem.email = ["me#example.com"]
gem.description = %q{bla bla bla}
gem.summary = %q{bla bla bla}
gem.homepage = "http://github.com/foobar/"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
gem.add_dependency "rails", ">= 3.1"
gem.add_dependency "jquery-rails"
gem.add_dependency "twitter-bootstrap-rails", ">= 2.1.0"
gem.add_development_dependency "bundler", ">= 1.0.0"
gem.add_development_dependency "rspec", "~> 2.3"
gem.add_development_dependency "sqlite3-ruby"
end
Output from rake install:
~/Projects/Github/my_gem% rake -vt install
** Invoke install (first_time)
** Execute install
my_gem 0.0.1 built to pkg/my_gem-0.0.1.gem
rake aborted!
Couldn't install gem, run `gem install /Users/owahab/Projects/Github/my_gem/pkg/my_gem-0.0.1.gem' for more detailed output
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:68:in `install_gem'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/bundler-1.2.1/lib/bundler/gem_helper.rb:43:in `block in install'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/owahab/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/bin/rake:19:in `load'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/bin/rake:19:in `<main>'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `eval'
/Users/owahab/.rvm/gems/ruby-1.9.3-p286/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => install
Output from rake build then gem install:
~/Projects/Github/rails_autocomplete% rake build && gem install pkg/my_gem-0.0.1.gem
my_gem 0.0.1 built to pkg/my_gem-0.0.1.gem
Successfully installed my_gem-0.0.1
1 gem installed
Installing ri documentation for my_gem-0.0.1...
Building YARD (yri) index for my_gem-0.0.1...
Installing RDoc documentation for my_gem-0.0.1...
Based on the comment thread on the question, it was a permission problem. Debugging Bundler's gem_helper.rb file revealed this:
ERROR: While executing gem ... (Errno::EACCES) Permission denied - /Users/owahab/.rvm/gems/ruby-1.9.3-p286/gems/i18n-0.6.1/ci/Gemfile.no-rails
Some gems had been installed as root. Removing them solved the problem.
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
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.