I'm trying to follow along with Railscasts #235 (Omniauth in a rails app).
Having some trouble with the Omniauth gem in Rails (v3.2). When I install the gem in my Gemfile, and specify the following in omniauth.rb (in config/initializers/):
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, '...', '...'
end
I can't seem to start my server - I get the following error:
/Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-1.1.0/lib/omniauth/builder.rb:38:in `rescue in provider': Could not find matching strategy for :twitter. You may need to install an additional gem (such as omniauth-twitter). (LoadError)
I could include the omniauth-twitter gem (the server starts with that), but I don't know why this wouldn't work without it. When I forked the repo for the railscast, everything worked fine, so not sure why this is happening. I thought it was because I have the omniauth-twitter gem installed (although not being used in the bundle), and I uninstalled it but that didn't work.
Full Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.2'
gem 'omniauth'
gem 'jquery-rails'
gem 'bootstrap-sass'
gem 'bcrypt-ruby'
gem 'redcarpet'
group :development, :test do
gem 'pg', '0.12.2'
gem 'rspec-rails', '2.9.0'
gem 'annotate'
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '1.4.0'
end
group :production do
gem 'pg', '0.12.2'
end
Full stack trace below:
/Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-1.1.0/lib/omniauth/builder.rb:38:in `rescue in provider': Could not find matching strategy for :twitter. You may need to install an additional gem (such as omniauth-twitter). (LoadError)
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-1.1.0/lib/omniauth/builder.rb:35:in `provider'
from /Users/tarunsachdeva/Development/rails/workbench/config/initializers/omniauth.rb:2:in `block in <top (required)>'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/omniauth-1.1.0/lib/omniauth/builder.rb:7:in `initialize'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:43:in `new'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:43:in `build'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:113:in `block in build'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:113:in `each'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:113:in `inject'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.2/lib/action_dispatch/middleware/stack.rb:113:in `build'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/engine.rb:470:in `app'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/tarunsachdeva/Development/rails/workbench/config/environment.rb:5:in `<top (required)>'
from /Users/tarunsachdeva/Development/rails/workbench/config.ru:4:in `require'
from /Users/tarunsachdeva/Development/rails/workbench/config.ru:4:in `block in <main>'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/tarunsachdeva/Development/rails/workbench/config.ru:1:in `new'
from /Users/tarunsachdeva/Development/rails/workbench/config.ru:1:in `<main>'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands/server.rb:46:in `app'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands/server.rb:70:in `start'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands.rb:50:in `tap'
from /Users/tarunsachdeva/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.2/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any and all help is appreciated.
Read error message. You need add omniauth-twitter gem to Gemfile.
I'm fashionably late to the party here but I think you were being asked for omniauth-twitter because you were using the latest version of Omniauth > 1 and not the ~> 0.3.0 version as in the Railscasts.
But you've probably already figured that out ;)
Related
I'm currently upgrading the application's test frameworks, and have run into a knot here. I believe the issue is getting overcomplicated because I'm porting the app into Vagrant at the same time, but regardless, the issue is very curious.
Here is the stack trace when running bundle exec rspec
/home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'capybara'. (Bundler::GemRequireError)
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/vagrant/app/config/application.rb:11:in `<top (required)>'
from /home/vagrant/app/config/environment.rb:2:in `require'
from /home/vagrant/app/config/environment.rb:2:in `<top (required)>'
from /home/vagrant/app/spec/spec_helper.rb:5:in `require'
from /home/vagrant/app/spec/spec_helper.rb:5:in `<top (required)>'
from /home/vagrant/app/spec/controllers/administration/course_groups_controller_spec.rb:1:in `require'
from /home/vagrant/app/spec/controllers/administration/course_groups_controller_spec.rb:1:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `load'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `each'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in `run'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:100:in `rescue in run'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:96:in `run'
from /home/vagrant/.rvm/gems/ruby-2.0.0-p643#oaisd_uae_web_app/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
Here are my capybara gem versions
capybara (2.5.0)
capybara-screenshot (0.3.3)
capybara-webkit (1.7.1)
Along with my rspec version of 2.99
In the stack trace, line 11 in application.rb is as follows:
Bundler.require *Rails.groups(:assets => %w(development test))
And my relavent gemfile portions:
group :test do
...
gem 'minitest', '3.1.0'
gem 'cucumber', '1.1.9'
gem 'cucumber-rails', '1.3.0', :require => false
gem 'capybara', '2.5.0'
gem "capybara-webkit", '1.7.1'
gem "capybara-screenshot", '0.3.3'
gem "nokogiri", '1.5.11'
gem 'launchy'
gem 'database_cleaner', '0.7.2'
gem 'shoulda-matchers', '1.0.0'
...
end
group :development, :test do
...
gem 'rspec-rails', '~> 2.99'
gem 'jasmine', '1.3.2'
gem 'teaspoon'
gem 'teaspoon-jasmine'
gem 'phantomjs'
gem 'pry', '0.9.9.6'
gem 'pry-rails', '0.1.6'
gem 'pry-remote', '0.1.5'
...
end
And it does bundle! I also might add that my cucumber tests are running just fine. So capybara is working apart from rspec.
I've tried the following: Upgraded rspec to 3.0, upgraded ruby to 2.0, tried different versions of capybara, in case they aren't compatible. Does anyone have any suggestions for next steps?
I am trying to test my app on Rails beta3. When I am trying to run the application on rails server I get the following error (with stacktrace)
/home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'rails-api'. (Bundler::GemRequireError)
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/sambhav/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/sambhav/caroobi/caroobi/config/application.rb:7:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/command.rb:20:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/bundler/gems/rails-cf1d45bd8930/railties/lib/rails/commands.rb:18:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `require'
from /home/sambhav/caroobi/caroobi/bin/rails:9:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /home/sambhav/caroobi/caroobi/vendor/cache/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sambhav/caroobi/caroobi/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Gemfile
source 'https://rubygems.org'
gem 'rails', github: "rails/rails"
gem 'sass-rails', '~> 5.0'
gem 'mysql2', '0.3.18'
gem 'uglifier', '>= 1.3.0'
gem 'geoip', '1.4.0'
gem 'sanitize', '3.0.0'
gem 'i18n-js', '2.1.2'
gem 'bootstrap-sass', '3.2.0.1' # Bootstrap in SCSS
gem 'exception_notification', '4.0.1'
gem 'rake', '10.3.2'
gem 'newrelic_rpm', '~> 3.14', '>= 3.14.2.312'
gem 'active_model_serializers', '0.9.4'
gem 'rails-api', '0.4.0'
gem 'prerender_rails'
gem 'i18n-docs'
group :development, :test do
gem 'pry'
gem 'spring'
gem 'annotator', require: false
gem 'letter_opener'
gem 'rspec-rails'
gem 'rack-cors'
gem 'sqlite3'
end
Note: I have already installed NodeJS as a few posts suggested.
Ruby Version: 2.3.0
Anything else I could try?
If you're working with Rails 5, do not include the gem rails-api (which is already included in Rails 5).
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin 0.5.0/lib/active_admin/application.rb:283:in `generate_stylesheets': uninitialized constant Sass::Plugin (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin-0.5.0/lib/active_admin/application.rb:105:in `prepare!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activeadmin-0.5.0/lib/active_admin.rb:72:in `setup'
from /Users/devinross/Desktop/music-server1/config/initializers/active_admin.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:587:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/engine.rb:587:in `block in <class:Engine>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/devinross/Desktop/music-server1/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.8/lib/rails/commands.rb:25:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Does anyone know how to fix this?
gem 'rails', '~> 3.2.8'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'yui-compressor'
end
gem 'nokogiri'
# infrastructure
gem 'rake', require: false
gem 'pg'
gem 'dalli'
# web server
# gem 'thin' # for evented server
# gem 'goliath' # for evented server
gem 'puma' # for multi-threaded server
# gem 'unicorn' # for multi-processor server
# queue
gem 'sidekiq'
gem 'slim'
gem 'sinatra', :require => nil
# support
gem 'newrelic_rpm'
gem 'airbrake'
gem 'heroku'
Check out this issue here: https://github.com/gregbell/active_admin/issues/1686
In that issue there's a pull request for this problem: https://github.com/gregbell/active_admin/pull/2028
You may also be able to resolve the issue by precompiling the admin assets like in section 4.1 here: http://guides.rubyonrails.org/asset_pipeline.html
After upgrading to rails 3.1 i am now getting this error after trying to run rails server:
/usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `context_class' for nil:NilClass (NoMethodError)
there are a bunch of other lines of failures too but i didn't want to paste all of them. here's my gemfile:
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'activeadmin'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3', '1.3.4'
gem 'gravatar_image_tag', '0.1.0'
gem 'will_paginate', '3.0.pre2'
gem 'meta_search'
gem 'sass-rails'
group :development do
gem 'rspec-rails', '2.0.1'
gem 'annotate-models', '1.0.4'
gem 'ruby-debug19', :require => 'ruby-debug'
end
group :test do
gem 'rspec', '2.0.1'
gem 'webrat', '0.7.1'
gem 'autotest-fsevent', '0.2.4'
gem 'autotest-growl', '0.2.9'
gem 'autotest', '4.3.2'
gem 'autotest-rails-pure', '4.1.0'
gem 'spork', '0.8.4'
gem 'factory_girl_rails', '1.0'
end
here's the rest of the error:
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:68:in `establish_connection'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.1.0/lib/active_record/railtie.rb:69:in `block (2 levels) in <class:Railtie>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.1.0/lib/active_record/railtie.rb:67:in `block in <class:Railtie>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `block in run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/beatjunkie84/Desktop/ProjectX/config/environment.rb:5:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
from /Users/beatjunkie84/Desktop/ProjectX/config.ru:4:in `block in <main>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/builder.rb:51:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/builder.rb:51:in `initialize'
from /Users/beatjunkie84/Desktop/ProjectX/config.ru:1:in `new'
from /Users/beatjunkie84/Desktop/ProjectX/config.ru:1:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/builder.rb:40:in `eval'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/server.rb:200:in `app'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/commands/server.rb:46:in `app'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/server.rb:301:in `wrapped_app'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.4/lib/rack/server.rb:252:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/commands/server.rb:70:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/commands.rb:54:in `block in <top (required)>'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap'
from /usr/local/rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
what can i do ?
Try running rake rails:update. Overwrite your files when it asks, but then review the changes and make sure you keep the ones you want to keep (so in the end you are keeping a merged result of their changes and yours).
This is what I did, and it fixed a similar error to yours.
Here is my Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.0'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'will_paginate', '3.0.pre2'
gem 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git'
gem 'mime-types', :require => 'mime/types'
gem 'rails3-generators'
gem 'devise', '~> 1.1.3'
gem 'devise_invitable', '~> 0.3.4'
gem 'declarative_authorization', :git => 'git://github.com/stffn/declarative_authorization.git'
gem 'aasm'
gem 'braintree'
gem 'thumbs_up'
gem 'best_in_place'
gem "friendly_id", "~> 3.2"
gem 'aws-s3'
group :development do
# Server
gem 'thin'
#gem 'rspec-rails', '2.0.1'
gem 'annotate-models', '1.0.4'
#gem 'rails-erd'
gem 'annotate'
gem 'faker', '0.3.1'
gem 'ruby_parser'
end
group :test do
gem 'rspec', '2.0.1'
gem 'webrat', '0.7.1'
#gem 'spork', '0.8.4'
#gem 'factory_girl_rails', '1.0'
end
Here is the error I am getting:
$ thin start
>> Using rack adapter
/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.7/lib/bundler.rb:199: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040766
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require': no such file to load -- rails_admin/application_controller (LoadError)
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `block in require'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `require'
/myapp/config/initializers/rails_admin.rb:1:in `<top (required)>'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `block in load'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:591:in `new_constants_in'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:225:in `load_dependency'
/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:201:in `block (2 levels) in <class:Engine>'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:200:in `each'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/engine.rb:200:in `block in <class:Engine>'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `instance_exec'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:25:in `run'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:50:in `block in run_initializers'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `each'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/initializable.rb:49:in `run_initializers'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/application.rb:134:in `initialize!'
/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.0/lib/rails/application.rb:77:in `method_missing'
/myapp/config/environment.rb:5:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
myapp/config.ru:3:in `block in <main>'
/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
myapp/config.ru:1:in `new'
myapp/config.ru:1:in `<main>'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `eval'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:36:in `load'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/rack/adapter/loader.rb:45:in `for'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:169:in `load_adapter'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/controllers/controller.rb:73:in `start'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.11/bin/thin:6:in `<top (required)>'
/.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `load'
/.rvm/gems/ruby-1.9.2-p0/bin/thin:19:in `<main>'
I used to have rails_admin installed, but I commented it out and ran bundle update and bundle install.
Still getting this error though.
Delete config/initializers/rails_admin.rb, relax and float down stream.