Windows 10: Michael Hartl Chapter3: Rspec Spec error - ruby-on-rails-4

I am running the rspec spec/ command from the third chapter. Created the sample_app using command
rails new sample_app -T -database=postgresql
and when running the command rspec spec/ getting the below error.
C:\Users\ASUS PC\rails_projects\Sample_App>rspec spec
You must 'gem install win32console' to use colour on Windows
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- test/unit/assertions (LoadError)
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-2.0.1/lib/rspec/rails/adapters.rb:2:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-rails-2.0.1/lib/rspec/rails.rb:20:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from C:/Users/ASUS PC/rails_projects/Sample_App/spec/spec_helper.rb:4:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Users/ASUS PC/rails_projects/Sample_App/spec/controllers/pages_controller_spec.rb:1:in `<top (required)>'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `load'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `block in load_spec_files'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `map'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/configuration.rb:306:in `load_spec_files'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:55:in `run_in_process'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:46:in `run'
from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/rspec-core-2.0.1/lib/rspec/core/runner.rb:10:in `block in autorun'
Looks like rails is looking for test directory which was not created.
Rspec Gem list:
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
rspec-rails (2.0.1)
rspec-support (3.4.1)
Gemfile Development and Test
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'webrat', '0.7.3'
gem 'rspec-rails', '~> 2.0.0'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end

Did you actually try to install the gem mentionned in the error ?
gem install win32console
Also it seems you still have some dependencies to the classical test framework. Did you check application.rb for any call to the test railties that would not be commented out ?
# require "rails/test_unit/railtie"
Shoud be commented

Related

Getting error during creating rails app -> ruby/2.3.0/erb.rb:864:in `eval': (erb):4: syntax error, unexpected '=' (SyntaxError)

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

Error when trying openning console rails in prod

I'm using rails 4.2.0
I'm using ruby : ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
and rbenv : rbenv 0.4.0-129-g7e0e85b
when I'm trying to open rails c in console in production, I have the following error :
~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `initialize': Permission denied # rb_sysopen - /tmp/spring/71079e88c49df6873d86594ca3ada123.pid (Errno::EACCES)
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `open'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `open'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/env.rb:69:in `server_running?'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/run.rb:25:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/rails.rb:23:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client/command.rb:7:in `call'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/client.rb:26:in `run'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/bin/spring:48:in `<top (required)>'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `load'
from ~/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/spring-1.3.3/lib/spring/binstub.rb:11:in `<top (required)>'
from ~/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from ~/.rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/www/site/bin/spring:16:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
I have update bundle, but nothing change. What's wrong?
Do you have the spring gem inside your production group?
Spring should be inside test and dev only. eg.
group :development, :test do
gem 'spring'
end
fix by :
sudo chmod -R 1777 /tmp
and reboot spring.

Error while installing rails gem

So I have ruby 2.2.0 installed on a VPS and I'm trying to install rails. The only problem is, when I do a gem install rails it fails. I tried it with the backtrace and the following is what I get:
usera#node3:~$ gem install --backtrace rails
ERROR: While executing gem ... (SocketError)
getaddrinfo: Name or service not known
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:791:in `send'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:791:in `send'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:672:in `request'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:528:in `block in fetch_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1096:in `block (3 levels) in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1094:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1094:in `block (2 levels) in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1093:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1093:in `block in resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1091:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:1091:in `resolv'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:519:in `fetch_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:509:in `each_resource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/resolv.rb:490:in `getresource'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:92:in `api_endpoint'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source.rb:46:in `api_uri'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source.rb:85:in `dependency_resolver_set'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:23:in `block in pick_sets'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/source_list.rb:97:in `each_source'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:22:in `pick_sets'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/best_set.rb:28:in `find_all'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb:151:in `find_all'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/resolver/installer_set.rb:54:in `add_always_install'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/dependency_installer.rb:463:in `resolve_dependencies'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:238:in `install_gem'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:299:in `block in install_gems'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:295:in `each'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:295:in `install_gems'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/commands/install_command.rb:202:in `execute'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:307:in `invoke_with_build_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:168:in `process_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:138:in `run'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/gem_runner.rb:54:in `run'
/home/usera/.rbenv/versions/2.2.0/bin/gem:21:in `<main>'
I also ran gem install --backtrace -p rails and got the following
usera#node3:~$ gem install --backtrace -p rails
ERROR: While executing gem ... (OptionParser::InvalidArgument)
invalid argument: -p rails
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/local_remote_options.rb:27:in `block in accept_uri_http'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:377:in `handle_options'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command.rb:298:in `invoke_with_build_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:168:in `process_args'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/command_manager.rb:138:in `run'
/home/usera/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/gem_runner.rb:54:in `run'
/home/usera/.rbenv/versions/2.2.0/bin/gem:21:in `<main>'
It seems to work fine on my other VPS so I'm a bit confused.
Thanks in advance!
So I finally figured out what was going on. It turns out that the configuration file for the DNS servers had an extra comma after the IP addresses which caused it to not resolve properly. I'm on ubuntu 14.04 and the file was in /etc/resolve.conf.

undefined method `less' when db:migrate

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

Getting error in rails after installing devise

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.