Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring support not working when running rails server #140

Closed
alex88 opened this issue Oct 4, 2014 · 2 comments
Closed

Spring support not working when running rails server #140

alex88 opened this issue Oct 4, 2014 · 2 comments

Comments

@alex88
Copy link

alex88 commented Oct 4, 2014

Using 1.0, spring support works when running rails c, running rails s however raises this exception:

/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/dotenv-1.0.0/lib/dotenv/railtie.rb:7:in `block in <class:Railtie>': undefined method `watch' for Spring:Module (NoMethodError)
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:36:in `call'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:44:in `each'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.1.6/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:123:in `initialize'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/railtie.rb:171:in `new'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/railtie.rb:171:in `instance'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/application.rb:90:in `inherited'
    from /Volumes/Data/home/alessandro/Sites/timetable/config/application.rb:17:in `<module:Timetable>'
    from /Volumes/Data/home/alessandro/Sites/timetable/config/application.rb:16:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `require'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:79:in `block in server'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
    from /Volumes/Data/home/alessandro/Sites/timetable/bin/rails:8:in `require'
    from /Volumes/Data/home/alessandro/Sites/timetable/bin/rails:8:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Volumes/Data/home/alessandro/Sites/timetable/bin/spring:16:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

I've just added it on a brand new rails app

@mdesantis
Copy link

Same problem here (dotenv-rails 0.11.1, spring 1.1.3). Downgrading dotenv-rails to 0.11.1 solves it.

@sirwolfgang
Copy link

Confirming what mdesatis is saying

sheax0r pushed a commit to sheax0r/dotenv that referenced this issue Sep 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants