I am trying to write unit tests for my database using fixtures in rails 5.0.1.
I keep getting the error:
test/test_helper.rb:7:in `<class:TestCase>': undefined method `fixtures' for ActiveSupport::TestCase:Class (NoMethodError)
from /Users/Stephan/ruby/react/test/test_helper.rb:5:in `<top (required)>'
from /Users/Stephan/ruby/react/test/models/blog_test.rb:1:in `require'
from /Users/Stephan/ruby/react/test/models/blog_test.rb:1:in `<top (required)>'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/test_requirer.rb:11:in `require'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/test_requirer.rb:11:in `block in require_files'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/test_requirer.rb:10:in `each'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/test_requirer.rb:10:in `require_files'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/minitest_plugin.rb:86:in `plugin_rails_init'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/minitest-5.10.1/lib/minitest.rb:80:in `block in init_plugins'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/minitest-5.10.1/lib/minitest.rb:78:in `each'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/minitest-5.10.1/lib/minitest.rb:78:in `init_plugins'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/minitest-5.10.1/lib/minitest.rb:129:in `run'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/railties-5.0.1/lib/rails/test_unit/minitest_plugin.rb:73:in `run'
from /Users/Stephan/.rvm/gems/ruby-2.4.0#global/gems/minitest-5.10.1/lib/minitest.rb:62:in `block in autorun'
Everything in the test_helper.rb is out of the box ruby 2.4.0 and rails 5.0.1.
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end
Any help would be appreciated. For reference here is the test_helper.rb file
Related
I'm newbie to Ruby on Rails. I complete installation with little to no stress, but while create a new app using command 'rails new ' I'm getting error and /bin is not getting generated. Error log below. I've spent whole night trying to understand the cause but alas with no success. Any help will be appreciated.
Few details of my machine :
I'm using OS X El cap v 10.11.5
Rails on 4.2.6
Ruby on 2.3.1
database is Mongodb enterprise 3.2.7
error details
localhost:versions kiranchakravarthy$ rails --version
Rails 4.2.6
localhost:versions kiranchakravarthy$ rails _4.2.6_ new hello_world
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
/Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/2.3.0/erb.rb:864:in `eval': (erb):4: syntax error, unexpected '=' (SyntaxError)
= gem.comment
^
(erb):6: syntax error, unexpected '=', expecting keyword_end
= gem.commented_out ? '# ' : '...
^
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/2.3.0/erb.rb:864:in `result'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:17:in `template'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:45:in `gemfile'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/app_base.rb:132:in `build'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/generators/rails/app/app_generator.rb:186:in `create_root_files'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/application.rb:17:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/cli.rb:14:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-4.2.6/bin/rails:9:in `<top (required)>'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/bin/rails:22:in `load'
from /Users/kiranchakravarthy/.rbenv/versions/2.3.1/bin/rails:22:in `<main>'
Try reinstalling Ruby 2.3.1 via your rbenv
Hello now i am install redmine but when i try migrate my database there is a error :
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
there is stacktrce :
root#server:/opt/redmine/redmine-3.0# bundle exec rake db:migrate
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
rake aborted!
ActiveRecord::AdapterNotSpecified: 'development' database is not configured. Available: ["production"]
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:211:in `resolve_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
/var/lib/gems/2.1.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
/opt/redmine/redmine-3.0/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:12:in `eval'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:2:in `each'
/opt/redmine/redmine-3.0/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/opt/redmine/redmine-3.0/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/lib/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/var/lib/gems/2.1.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
While performing bundler actions like the above, you have to always specify environment, unless it's added to your system or shell's environment vars, like ~/.bashrc on linux or environment variables under windows, so in your command, you should add RAILS_ENV=production, and your command would look like this:
bundle exec rake db:migrate RAILS_ENV=production
I am trying to use rspec for tdd in rails 4.1 . I am using spree commerce and refinery cms gem in rails. but when i run $ rspec spec it give me following error.
uninitialized constant ApplicationController (NameError)
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/bundler/gems/spree-refinery-authentication-f9168bd7fe97/lib/spree_refinery_authentication/engine.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/bundler/gems/spree-refinery-authentication-f9168bd7fe97/lib/spree-refinerycms-authentication.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
from /home/zapbuild/.rvm/gems/ruby-2.1.2#global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
from /var/www/ws_groupbuy/config/application.rb:7:in `<top (required)>'
from /var/www/ws_groupbuy/config/environment.rb:2:in `require'
from /var/www/ws_groupbuy/config/environment.rb:2:in `<top (required)>'
from /var/www/ws_groupbuy/spec/spec_helper.rb:3:in `require'
from /var/www/ws_groupbuy/spec/spec_helper.rb:3:in `<top (required)>'
from /var/www/ws_groupbuy/spec/models/spree/product_spec.rb:1:in `require'
from /var/www/ws_groupbuy/spec/models/spree/product_spec.rb:1:in `<top (required)>'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `load'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `block in load_spec_files'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `each'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/configuration.rb:1065:in `load_spec_files'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/command_line.rb:18:in `run'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:103:in `run'
from /home/zapbuild/.rvm/gems/ruby-2.1.2/gems/rspec-core-2.99.1/lib/rspec/core/runner.rb:17:in `block in autorun'
My spec_helper is :
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require "capybara/rspec"
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.maintain_test_schema!
RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.infer_spec_type_from_file_location!
When I try to db:migrate my app, I Get this error:
rake aborted!
undefined method `less' for #<Rails::Application::Configuration:0x007fdca55c75e0>
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/railtie/configuration.rb:95:in `method_missing'
/app/vendor/bundle/ruby/2.1.0/bundler/gems/twitter-bootstrap-rails-965ebd304f74/lib/twitter/bootstrap/rails/engine.rb:17:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:215:in `initialize!'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:6:in `<top (required)>'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `block in require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in `load_dependency'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:189:in `require_environment!'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.3/lib/rails/application.rb:250:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
What could be wrong? I already have gem 'less', '2.4.0' in Gemfile
Add therubyracer gem and less-rails gem
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"
Please check the link for issue at the gem: https://github.com/seyhunak/twitter-bootstrap-rails/issues/437
I am getting this error after installing devise for users
C:3:in `rescue in execute_if_updated': Rails::Application::RoutesReloader#execut
e_if_updated delegated to updater.execute_if_updated, but updater is nil: #<Rail
s::Application::RoutesReloader:0x3900780 #paths=["C:/ror/wishlistize/config/rout
es.rb"], #route_sets=[#<ActionDispatch::Routing::RouteSet:0x393a140>]> (RuntimeE
rror)
from C:131071:in `execute_if_updated'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation/finisher.rb:69:in `block in <module:Finisher>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:30:in `instance_exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:30:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:55:in `block in run_initializers'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each
_strongly_connected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_
component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_c
onnected_component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_
component'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/initia
lizable.rb:54:in `run_initializers'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation.rb:215:in `initialize!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/railti
e/configurable.rb:30:in `method_missing'
from C:/ror/wishlistize/config/environment.rb:5:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:213:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.0/lib/active_
support/dependencies.rb:228:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/applic
ation.rb:189:in `require_environment!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/comman
ds.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I am not sure if its because of devise
here's my routes file
Wishlistize::Application.routes.draw do
devise_for :users
end
and environment.rb
# Load the Rails application.
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
Wishlistize::Application.initialize!
I get this when i run rake db:migrate
User model:
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end
Okay I figure this out. I did not actually run rails g devise:install but directly rails g devise:user according to the tutorial that I had read. It seems that was causing the problem. I installed the edge version and it became clear.