I am having a major issue trying to start my Rails project. I am taking a rails 4.0.0 project and trying to run it on a Rails 3.2.6 system. My work environment uses a Rails 3.2.6 environment and my system at home where I was working from home (a mac mini) uses rails 4. I have since started using my Linux laptop which has Rails 3.2.6 like my employer uses.
Here is my error trace:
ironmantis7x#ironscribe5:~/RoR_projects/mock_devices2$ rails server
=> Booting WEBrick
=> Rails 3.2.6 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/mapper.rb:260:in `merge': can't convert String into Hash (TypeError)
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/mapper.rb:260:in `root'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/mapper.rb:1317:in `root'
from /home/ironmantis7x/RoR_projects/mock_devices2/config/routes.rb:10:in `block in <top (required)>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /home/ironmantis7x/RoR_projects/mock_devices2/config/routes.rb:1:in `<top (required)>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `block in load'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:245:in `load'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/file_update_checker.rb:78:in `call'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/activesupport-3.2.6/lib/active_support/file_update_checker.rb:78:in `execute'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/ironmantis7x/RoR_projects/mock_devices2/config/environment.rb:5:in `<top (required)>'
from /home/ironmantis7x/RoR_projects/mock_devices2/config.ru:4:in `require'
from /home/ironmantis7x/RoR_projects/mock_devices2/config.ru:4:in `block in <main>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /home/ironmantis7x/RoR_projects/mock_devices2/config.ru:1:in `new'
from /home/ironmantis7x/RoR_projects/mock_devices2/config.ru:1:in `<main>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/commands/server.rb:46:in `app'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/commands/server.rb:70:in `start'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/commands.rb:50:in `tap'
from /home/ironmantis7x/.rvm/gems/ruby-1.9.3-p448#rails_testbed1/gems/railties-3.2.6/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
ironmantis7x#ironscribe5:~/RoR_projects/mock_devices2$
Here is my environment.rb file:
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
MockDevices2::Application.initialize!
And here is my boot.rb file:
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'thread'
my gem list is as follows:
actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
builder (3.0.4)
bundler (1.3.5)
bundler-unload (1.0.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.2)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.3)
i18n (0.6.4)
jbuilder (1.4.2)
journey (1.0.4)
jquery-rails (3.0.1)
json (1.8.0)
mail (2.4.4)
mime-types (1.23)
mini_portile (0.5.0)
multi_json (1.7.7)
nokogiri (1.6.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.6)
railties (3.2.6)
rake (10.1.0)
rdoc (3.12.2)
rubygems-bundler (1.2.0)
rvm (1.11.3.8)
sass (3.2.9)
sass-rails (3.2.6)
sdoc (0.3.20)
sprockets (2.1.3)
sqlite3 (1.3.7)
thor (0.18.1)
tilt (1.4.1)
treetop (1.4.14)
turbolinks (1.2.0)
tzinfo (0.3.37)
uglifier (2.1.1)
Can you post your routes.rb? Seems like the problem is at
from /home/ironmantis7x/RoR_projects/mock_devices2/config/routes.rb:10:in `block in <top (required)>'
This happened to me and the problem was that I used
root 'welcome#index'
instead of
root to: 'welcome#index'
and rails 3 doesn't like that
Related
i get the following errors when i try to open the rails console:
$ rails console
/home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- minitest/unit (LoadError)
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /usr/share/ruby/test/unit/assertions.rb:1:in `<top (required)>'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /usr/share/ruby/test/unit/testcase.rb:1:in `<top (required)>'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/test_case.rb:1:in `<top (required)>'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/console/app.rb:2:in `<top (required)>'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:304:in `initialize_console'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:152:in `load_console'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/console.rb:27:in `start'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I use Fedora 17. I have installed Ruby and gem via yum and then rails via gem.
UPDATE:
My installed gems, maybe there are some gems in my gemset missing or i have the false version of it.
$ gem list
*** LOCAL GEMS ***
actionmailer (3.2.13)
actionpack (3.2.13)
activemodel (3.2.13)
activerecord (3.2.13)
activeresource (3.2.13)
activesupport (3.2.13)
arel (3.0.2)
builder (3.0.4)
bundler (1.3.4)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.2)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.1)
json (1.7.7)
mail (2.5.3)
mime-types (1.22)
minitest (4.7.0)
multi_json (1.7.2)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13)
railties (3.2.13)
rake (10.0.4)
rdoc (3.12.2)
sass (3.2.7)
sass-rails (3.2.6)
sprockets (2.2.2)
thor (0.18.1)
tilt (1.3.6)
treetop (1.4.12)
tzinfo (0.3.37)
uglifier (1.3.0)
Try by running:
script/rails console
and let us know what happens, otherwise you can also try
bundle exec script/rails console
It's odd to be loading tests in the console... the minitest gem is probably only included in the test group and not available in the development environment. Adding the gem to the development group would probably work, but that's treating a symptom, not the cause.
Somehow, maybe in a irbrc file, you are including test libraries.
Okay, i have solved the problem via manually installing ruby 2.0.0 and removing ruby 1.9.3 that i have installed via yum.
group :development, :test do
gem 'test-unit'
end
and running
bundle
fixed my issue.
In your case you might want to include 'minitest'
I have searched the internet and stackoverflow for answers but none of the answers work for me and I am not able to install nodejs onto my server.
I am using Rails 3.2.3, Ruby 1.9.3p374.
When I run 'bundle install' and 'bundle update' I do not recieve any errors.
Here is my error after running 'rails s':
/home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /home/Nameo0/rails_projects/first_app/config/application.rb:7:in `<top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
from /home/Nameo0/.rvm/gems/ruby-1.9.3-p374#rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Here are the gems that I have installed:
actionmailer (3.2.3)
actionpack (3.2.11, 3.2.3)
activemodel (3.2.11, 3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.11, 3.2.3)
arel (3.0.2)
builder (3.0.4)
bundler (1.2.3)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.4.0)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.2.0, 2.0.1)
json (1.7.6)
libv8 (3.11.8.13 x86_64-linux)
mail (2.4.4)
mime-types (1.19)
multi_json (1.5.0)
polyglot (0.3.3)
rack (1.4.4)
rack-cache (1.2)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.3)
railties (3.2.3)
rake (10.0.3)
rdoc (3.12)
ref (1.0.2)
rubygems-bundler (1.1.0)
rubygems-update (1.8.24)
rvm (1.11.3.6)
sass (3.2.5)
sass-rails (3.2.6, 3.2.4)
sprockets (2.2.2, 2.1.3)
sqlite3 (1.3.7, 1.3.5)
therubyracer (0.11.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
uglifier (1.3.0, 1.2.3)
I fixed this issue by opening up the gem file and adding the following line:
gem "therubyracer", :require => 'v8'
Hope that helps anyone else who ever has this issue.
I installed activerecord-sqlserver-adapter such that it appears in my local gems.
Running the command...
rails generate scaffold Tablename fieldname:fieldtype
returns an error (as below). I've rails 1.9.2 installed. Any guidance or assistance would be much appreciated. Thanks
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `require': Please install the sqlserver adapter: `gem install activerecord-sqlserver-adapter` (no such file to load -- active_record/connection_adapters/sqlserver_adapter) (LoadError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:129:in `establish_connection'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/base.rb:721:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/generators/named_base.rb:166:in `pluralize_table_names?'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/generators/named_base.rb:114:in `table_name'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.2.8/lib/rails/generators/active_record/model/model_generator.rb:17:in `create_migration_file'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:109:in `invoke'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/group.rb:281:in `block in _invoke_for_class_method'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/shell.rb:74:in `with_padding'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/group.rb:270:in `_invoke_for_class_method'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/group.rb:150:in `_invoke_from_option_orm'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/generators.rb:171:in `invoke'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-.2.8/lib/rails/commands/generate.rb:12:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-.2.8/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
* LOCAL GEMS *
actionmailer (3.2.8, 3.1.0, 2.2.3)
actionpack (3.2.8, 3.1.0, 2.2.3)
activemodel (3.2.9, 3.2.8, 3.1.0)
activerecord (3.2.8, 3.1.0)
activerecord-sqlserver-adapter (3.2.10, 3.1.7)
activeresource (3.2.8, 3.1.0)
activesupport (3.2.9, 3.2.8, 3.1.0, 2.2.3)
ansi (1.4.3, 1.3.0)
archive-tar-minitar (0.5.2)
arel (3.0.2, 2.2.1)
bcrypt-ruby (3.0.1 x86-mingw32)
builder (3.0.4, 3.0.0)
bundler (1.2.1)
coffee-rails (3.2.2, 3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.4.0, 1.1.2)
columnize (0.3.6)
erubis (2.7.0)
execjs (1.4.0, 1.2.9)
ffi (1.1.5)
hike (1.2.1)
i18n (0.6.1, 0.6.0)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3, 1.0.14)
json (1.7.5, 1.6.1)
linecache19 (0.5.12)
mail (2.4.4, 2.3.0)
mime-types (1.19, 1.16)
minitest (4.1.0, 3.5.0, 3.4.0, 1.6.0)
multi_json (1.4.0, 1.3.7, 1.3.6, 1.0.3)
nokogiri (1.5.5 x86-mingw32)
polyglot (0.3.3, 0.3.2)
rack (1.4.1, 1.3.4)
rack-cache (1.2, 1.0.3)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.2, 0.6.1)
rails (3.2.8, 3.1.0)
railties (3.2.8, 3.1.0)
rake (10.0.2, 10.0.1, 0.9.2.2, 0.9.2, 0.8.7)
rdiscount (1.6.8)
rdoc (3.12, 3.10, 2.5.8)
ruby-debug-base19 (0.11.25)
ruby-debug-ide (0.4.16)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
sass (3.2.3, 3.1.10)
sass-rails (3.2.5, 3.1.4)
sprockets (2.1.3, 2.0.2)
sqlite3 (1.3.6 x86-mingw32, 1.3.4 x86-mingw32)
sqlite3-ruby (1.3.3)
thor (0.16.0, 0.14.6)
tilt (1.3.3)
tiny_tds (0.5.1 x86-mingw32)
tmail (1.2.7.1)
treetop (1.4.12, 1.4.11, 1.4.10)
turn (0.9.6, 0.8.3)
tzinfo (0.3.35, 0.3.30)
uglifier (1.3.0, 1.0.3)
win32-sound (0.5.0)
Is the gem listed in your Gemfile?
Add to your gemfile (gem manual)
gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter', '~> 3.1.0'
and run bundle install again
Finally resolved this. To fix I uninstalled 2 conflicting versions of activerecord-sqlserver-adapter, installed ruby-odbc gem, installed activerecord-sqlserver-adapter, tweaked the gemfile to reflect correct versions then ran bundle update, then bundle install and lastly the rails generate scaffold... command.
rails g scaffold failed, but oci script and irb data query worked. Couldn't figure out what went wrong.
rails g scaffold table field1:integer field2:string ....
invoke active_record
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:7:in `rescue in <top (required)>': ERROR: ActiveRecord oracle_enhanced adapter could not load ruby-oci8 library. Please install ruby-oci8 gem. (LoadError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:3:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:112:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:36:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1/lib/activerecord-oracle_enhanced-adapter.rb:12:in `block in <class:OracleEnhancedRailtie>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/active_record/base.rb:718:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/generators/named_base.rb:162:in `pluralize_table_names?'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/generators/named_base.rb:110:in `table_name'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.2/lib/rails/generators/active_record/model/model_generator.rb:17:in `create_migration_file'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:109:in `invoke'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:269:in `block in _invoke_for_class_method'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/shell.rb:74:in `with_padding'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:258:in `_invoke_for_class_method'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:150:in `_invoke_from_option_orm'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/generators.rb:170:in `invoke'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands/generate.rb:12:in `<top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `block in require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.2/lib/rails/commands.rb:29:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
gem list:
actionmailer (3.2.2)
actionpack (3.2.2)
activemodel (3.2.2)
activerecord (3.2.2)
activerecord-oracle_enhanced-adapter (1.4.1)
activeresource (3.2.2)
activesupport (3.2.2)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.0)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.2.0)
erubis (2.7.0)
execjs (1.3.0)
hike (1.2.1)
i18n (0.6.0)
io-console (0.3)
journey (1.0.3)
jquery-rails (2.0.1)
json (1.6.5, 1.5.4)
mail (2.4.3)
mime-types (1.17.2)
minitest (2.5.1)
multi_json (1.1.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.2)
railties (3.2.2)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
ruby-oci8 (2.1.0 x86-mingw32)
sass (3.1.15)
sass-rails (3.2.4)
sprockets (2.1.2)
sqlite3 (1.3.5 x86-mingw32)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.32)
uglifier (1.2.3)
ruby -r oci8 -e "OCI8.new('user', 'password', 'database').exec('select count(*) from table') do |r| puts r.join(','); end"
returns 0.86E2
Gemfile:
gem 'ruby-oci8', "~>2.1.0"
gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.1'
Going via IRB:
require 'rubygems'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'oracle_enhanced',
:database => 'database',
:username => 'user',
:password => 'password'
)
class abc < ActiveRecord::Base
self.table_name = 'tablename'
end
puts "records found: #{abc.all.size}"
records found: 86
=> nil
I had a similar problem running from Ruby Mine:
Do you have the Oracle clinet path set in:
DYLD_LIBRARY_PATH
I had them set in my terminal, but I had to make sure that RubyMine set the environment variables in my run profile:
DYLD_LIBRARY_PATH=/usr/local/oracle/instantclient10_2
NLS_LANG=AMERICAN_AMERICA.UTF8
Running scripts may not look for environment variables in the same place as terminal.
You may have to run the rails script as:
env DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH NLS_LANG=$NLS_LANG rails g scaffold ...
I'm using carrierwave in my application. The problem is it works well in development mode. But when deploying to nginx with passenger it throws the following error:
/home/webserver/raw/releases/20110919033346/app/models/category.rb:11: undefined method `mount_uploader' for Category:Class (NoMethodError)
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:454:in `load'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:454:in `load_file'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:453:in `load_file'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:340:in `require_or_load'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:300:in `depend_on'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:216:in `require_dependency'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/rails/mongoid.rb:55:in `load_model'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/rails/mongoid.rb:18:in `load_models'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/rails/mongoid.rb:17:in `each'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/rails/mongoid.rb:17:in `load_models'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/paths.rb:102:in `each'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/paths.rb:102:in `each'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/rails/mongoid.rb:16:in `load_models'
from /opt/ruby/lib/ruby/gems/1.8/gems/mongoid-2.0.1/lib/mongoid/railtie.rb:88:in `_callback_before_5'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/callbacks.rb:420:in `_run_prepare_callbacks'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/callbacks.rb:40:in `initialize'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:33:in `new'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:33:in `build'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:79:in `build'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:209:in `inject'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:79:in `each'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:79:in `inject'
from /opt/ruby/lib/ruby/gems/1.8/gems/actionpack-3.0.9/lib/action_dispatch/middleware/stack.rb:79:in `build'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:162:in `build_middleware_stack'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application/finisher.rb:35
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
from /home/webserver/raw/releases/20110919033346/config/environment.rb:5
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
from /opt/ruby/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:103:in `require_environment!'
from /opt/ruby/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/commands.rb:22
from script/rails:6:in `require'
from script/rails:6
Here is my gem list
abstract (1.0.0)
actionmailer (3.0.9, 3.0.7)
actionpack (3.0.9, 3.0.7)
activemodel (3.0.9, 3.0.7)
activerecord (3.0.9, 3.0.7)
activeresource (3.0.9, 3.0.7)
activesupport (3.1.0, 3.0.9, 3.0.7)
akami (1.0.0)
arel (2.0.10)
bcrypt-ruby (3.0.0)
bson (1.3.1)
bson_ext (1.3.1)
builder (3.0.0, 2.1.2)
bundle (0.0.1)
bundler (1.0.13)
carrierwave (0.5.7, 0.5.6, 0.5.4)
daemon_controller (0.2.6)
erubis (2.6.6)
escape (0.0.4)
exception_notification_rails3 (1.2.0)
fastthread (1.0.7)
gyoku (0.4.4)
httpi (0.9.5, 0.9.4)
i18n (0.6.0, 0.5.0)
mail (2.2.19)
mime-types (1.16)
mini_magick (3.3, 3.2.1)
mongo (1.3.1)
mongoid (2.0.1)
multi_json (1.0.3)
nokogiri (1.5.0, 1.4.4)
nori (1.0.2, 0.2.2)
passenger (3.0.7)
polyglot (0.3.2, 0.3.1)
pr_geohash (1.0.0)
pyu-ntlm-http (0.1.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.9, 3.0.7)
railties (3.0.9, 3.0.7)
rake (0.9.2, 0.9.0)
rdoc (3.9.4, 3.8)
rmagick (2.13.1)
rsolr (0.12.1)
rubyzip (0.9.4)
savon (0.9.7, 0.9.6, 0.9.2)
subexec (0.1.0, 0.0.4)
sunspot (1.2.1)
sunspot_rails_mongoid (1.2.1)
SystemTimer (1.2.3)
thor (0.14.6)
treetop (1.4.10, 1.4.9)
tzinfo (0.3.29, 0.3.27)
wasabi (2.0.0)
will_paginate (3.0.0, 3.0.pre4, 3.0.pre2)
The ruby version is ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.02
Please, could give any idea about this.
Thank you in advance!
I had the the same / a similar problem. In my case, it was something silly. In my Gemfile, I just referenced the gem, but you need to require the mongoid extension. So your line in the Gemfile should look like this:
gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'