I am trying to run rails console rails c in ConEmu and Cmder but get the following error....
C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `initialize': No such
file or directory # rb_sysopen - C:/Users/user.name/Documents/parentDir/app_dir/log/app_dev.log (Errno::ENOENT)
from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/open-uri.rb:30:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:600:in `create_l
ogfile'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:594:in `rescue i
n open_logfile'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:591:in `open_log
file'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:549:in `initiali
ze'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:318:in `new'
from C:/Ruby21-x64/lib/ruby/2.1.0/logger.rb:318:in `initiali
ze'
from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:57:in `new'
from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:57:in `block in <top (require
d)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/railtie.rb:210:in `instance_eval'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/railtie.rb:210:in `configure'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/railtie.rb:182:in `configure'
from C:/Users/user.name/Documents/parentDir/app_dir/config/environments/development.rb:11:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/engine.rb:594:in `block (2 levels) in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/engine.rb:593:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/engine.rb:593:in `block in <class:Engine>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:30:in `run'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:55:in `block in run_initializers'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:226:in `block in
tsort_each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:348:in `block (2
levels) in each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:418:in `block (2
levels) in each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:427:in `each_stro
ngly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:417:in `block in
each_strongly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:44:in `each'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:411:in `each_stro
ngly_connected_component_from'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:347:in `block in
each_strongly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `call'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:345:in `each_stro
ngly_connected_component'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:224:in `tsort_eac
h'
from C:/Ruby21-x64/lib/ruby/2.1.0/tsort.rb:205:in `tsort_eac
h'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/application.rb:300:in `initialize!'
from C:/Users/user.name/Documents/parentDir/app_dir/config/environment.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `block in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:232:in `load_dependency'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.
1.9/lib/active_support/dependencies.rb:247:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/application.rb:276:in `require_environment!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/commands/commands_tasks.rb:147:in `require_application_and_
environment!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/commands/commands_tasks.rb:68:in `console'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/commands/commands_tasks.rb:40:in `run_command!'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.1.9/l
ib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I can run rails console in the terminal on RubyMine but that is the most useless terminal ever to exist. Any idea what might be causing this?
It says that log/app_dev.log file is missing - try to create it in the app directory and see what happens.
Related
Attempting to do the Rails tutorial on railstutorial.org. I'm currently at the testing portion of the tutorial and I keep on getting an error when performing the test. The test file I created with 'generate StaticPages controller' command is as is, I have not modified it at all. When I enter in the command 'rails test' I get this error:
>/Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/abstract_controller/helpers.rb:152:in `rescue in block in modules_for_helpers': Missing helper file helpers//users/user/programming/odin/rails/sample_app/app/helpers/application_helper.rb_helper.rb (AbstractController::Helpers::MissingHelperError)
Here is the trace back:
> from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/abstract_controller/helpers.rb:149:in `block in modules_for_helpers'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/abstract_controller/helpers.rb:145:in `map!'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/abstract_controller/helpers.rb:145:in `modules_for_helpers'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/metal/helpers.rb:93:in `modules_for_helpers'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/abstract_controller/helpers.rb:109:in `helper'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/action_controller/railties/helpers.rb:17:in `inherited'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/test_case.rb:11:in `<class:TestCase>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/test_case.rb:10:in `<module:ActionView>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/test_case.rb:8:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/rails-controller-testing-0.1.1/lib/rails-controller-testing.rb:16:in `block in <top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/base.rb:215:in `<class:Base>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/base.rb:139:in `<module:ActionView>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionview-5.0.0.1/lib/action_view/base.rb:10:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:5:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application/default_middleware_stack.rb:48:in `block in build_stack'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application/default_middleware_stack.rb:13:in `tap'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application/default_middleware_stack.rb:13:in `build_stack'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:504:in `default_middleware_stack'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/engine.rb:506:in `block in app'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/engine.rb:504:in `synchronize'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/engine.rb:504:in `app'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
from /Users/user/Programming/Odin/rails/sample_app/config/environment.rb:5:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:92:in `require'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:92:in `preload'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:143:in `serve'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:131:in `block in run'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:125:in `loop'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application.rb:125:in `run'
from /Users/user/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/user/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
If this is formatted and asked imporperly or what not I apologize, any help will be greatly appreciated I absolutely stumped.
Here is the github repo : https://github.com/JDjedi/sample_app
Rails version is 5.0 and ruby version is 2.3.0p0
application_helper.rb_helper.rb - is this how you called your helper? .rb is an extension. Thus could you change the name of the helper file to application_helper.rb and see if that works?
Edit:
Did you look at this question? Rails: AbstractController::Helpers::MissingHelperError - Missing helper file application_helper.rb_helper.rb
Here seems to be a working answer: https://stackoverflow.com/a/28269245/1010826
Simply rename the root folder to the same name. Not sure why that would work, though :)
I am trying to connect the Log4r with the silence logger from active support with
Log4r.send :include,
ActiveRecord::SessionStore::Extension::LoggerSilencer
But now I get this error if I try to start the server :
I tried it with
require 'active_support/all'
in my session_store.rb and log4r.rb, but always get the same error. Anyone with an idea how to fix this ?
C:/Ruby200/lib/ruby/gems/2.0.0/gems/activerecord-session_store-1.0.0/lib/active_record/session_store/extension/logger_silencer.rb:16:in `block in <module:LoggerSilencer>': undefined method `cattr_accessor' for Log4r:Module (NoMethodError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/concern.rb:114:in `class_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/concern.rb:114:in `append_features'
from C:/SVN/FOS/branches/FOS_5_0/config/initializers/session_store.rb:4:in `include'
from C:/SVN/FOS/branches/FOS_5_0/config/initializers/session_store.rb:4:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `block in load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:223:in `load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:608:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/engine.rb:608:in `block in <class:Engine>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `run'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.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:210:in `block (2 levels) in each_strongly_connected_component_from'
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:209:in `block in each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:44:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/initializable.rb:44:in `tsort_each_child'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from C:/Ruby200/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_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.13/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/application.rb:215:in `initialize!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/SVN/FOS/branches/FOS_5_0/config/environment.rb:7:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:3:in `block in <main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:in `new'
from C:/SVN/FOS/branches/FOS_5_0/config.ru:in `<main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands/server.rb:48:in `app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands/server.rb:75:in `start'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:76:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:71:in `tap'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.13/lib/rails/commands.rb:71:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
cattr_accessor should be attr_accessor in the logger_silencer.rb file on line 16. Im pretty sure thats it, let use know if it's not.
Solution:
I update my Log4r because the old version I use was not compatible with the new rails. Now it works.
I'm trying to set up a rails json api using the rails-api gem but I'm having a little trouble getting it to work like it should.
I'm following this tutorial since I'll be creating this for an ember.js frontend.
http://blog.jasonkriss.com/building-an-app-with-ember-app-kit-part-1/
And bundling (after fixing the [ issue on line 3) works.
When I attempt to generate the model that he generates after bundling I just get something that looks like this in the terminal...
/Users/jordanriser/workspace/Test/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<Test::Application:0x007f9bcb9b0640> (NoMethodError)
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:590:in `each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `run'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:44:in `each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/jordanriser/.rbenv/versions/2.1.1/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/application.rb:215:in `initialize!'
from /Users/jordanriser/workspace/Test/config/environment.rb:5:in `<top (required)>'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/application.rb:189:in `require_environment!'
from /Users/jordanriser/.rvm/gems/ruby-2.1.1/gems/railties-4.0.4/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I've googled that "undefined method 'configure'" But I can't seem to find any definitive answers on what that is.
I'm trying to use 'rails generate devise model1' in rails 4, but the following error up.
> /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:229:in `default_controller_and_action': missing :controller (ArgumentError)
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `new'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `add_route'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1417:in `decomposed_match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1398:in `block in match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:330:in `root'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1459:in `root'
from /home/p4/rails_tut/test_app/config/routes.rb:3:in `block in <top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /home/p4/rails_tut/test_app/config/routes.rb:1:in `<top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/p4/rails_tut/test_app/config/environment.rb:5:in `<top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have no idea what this the internal working of rails is as this error seem to be some problem coming from 'mapping.rb'.
The following it my routes.rb
TestApp::Application.routes.draw do
root 'dunbs' => 'dunbs#index'
end
Your syntax for defining a root route is incorrect, it should be either root to: 'dunbs#index' or root 'dunbs#index'.
See http://guides.rubyonrails.org/routing.html#using-root for more details.
Whatever command like rake,rails etc I issue,I get the same error in my rails app.
Block not supplied (ArgumentError)
C:\Sites\merevik\merevik>rails console
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/ra
iltie/configurable.rb:24:in `class_eval': block not supplied (ArgumentError)
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/railtie/configurable.rb:24:in `configure'
from C:/Sites/merevik/merevik/config/initializers/setup_mail.rb:2:in `bl
ock in <top (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/railtie/configurable.rb:24:in `class_eval'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/railtie/configurable.rb:24:in `configure'
from C:/Sites/merevik/merevik/config/initializers/setup_mail.rb:1:in `<t
op (required)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:245:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:245:in `block in load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:245:in `load'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/engine.rb:587:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/engine.rb:587:in `block in <class:Engine>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/initializable.rb:30:in `instance_exec'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/initializable.rb:30:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/initializable.rb:55:in `block in run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/initializable.rb:54:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/initializable.rb:54:in `run_initializers'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/application.rb:136:in `initialize!'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Sites/merevik/merevik/config/environment.rb:5:in `<top (required
)>'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:251:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:251:in `block in require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:236:in `load_dependency'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-
3.2.1/lib/active_support/dependencies.rb:251:in `require'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/application.rb:103:in `require_environment!'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.2.1
/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
It appears that you are calling configure from line 2 of setup_mail.rb without passing a block. On line 1, you are also calling configure, and passing the block which contains the faulty call on line 2. I am guessing you are doing something like:
configure.some_option = 'value'
where you really meant:
config.some_option = 'value'
This is the source for configure:
def configure(&block)
class_eval(&block)
end
Calling class_eval without a block will always throw an ArgumentError.