-
Notifications
You must be signed in to change notification settings - Fork 340
Spring can't run Rails server when developing an engine #323
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
Comments
Experiencing the same issue on Rails 4.1.5 and Ruby 2.1.3p242. Doing the following as said in the README does not seem to fix it. $ cd <engine path>
$ echo "Spring.application_root = './spec/dummy'" > config/spring.rb |
+1, but is curious, the problem is only presented executing rails console |
i have the same issue as woohoou. This has only cropped up in the last few days |
Here's 2 ways that work for me. The first is nicer, but seems a little shaky. The second seems robust and quite quick but is hacky: Method 1 - Nice but Flaky Assuming that we're in the root of your engine, and your dummy app is in test/dummy: In config/spring.rb, make sure you have the following: Spring.application_root='test/dummy' And in test/dummy/config/spring.rb, make sure you have the following: Spring.application_root='' To start your server:
To start your console:
Method 2 - Hacky but Steady In config/spring.rb, make sure you have the following: Spring.application_root =File.expand_path(File.dirname(__FILE__)).gsub(/\/test\/dummy\/config/,'')+'/test/dummy' And in test/dummy/config, make a symlink to that file:
As I said: a bit hacky! :) |
@itsterry none of those two methods work for me on Rails 4.2 Worth noting that with Rails 4.2 now the only thing not working is the server:
The console and rake work:
|
The 1. method from @itsterry works for me. Thanks. |
For anyone who happens here and the above solutions don't work. I had the same error
Running rails 4.2.4 on ruby 2.2.2p95. ENGINE_ROOT/config/spring.rb
With just that change, what worked was:
spring rails s still failed with above error. How I got that working was:
Now from ENGINE_ROOT/spec/dummy: spring rails s Without the empty Gemfile the error message was triggered from: https://github.com/rails/spring/blob/master/lib/spring/configuration.rb#L43 |
|
@tjcjc did you mean adding it to first line of None of above worked for me, but running below command from
|
|
I solved this problem. My gemini duplicate program placed the config file in the trash, had to put back. Gemini - please fix this bug. Anyone has this problem check your config file. |
For those of you who have this working, does |
Steps to reproduce:
Trying to start the server from the engine directory:
Trying to start the Rails console from the engine directory:
Enter the dummy directory:
Trying to start the Rails server using the rails bin file directly:
Trying to start the Rails server using Spring:
Using Rails 4.1.4 and Ruby 2.1.2p95 on OS X Mavericks 10.9.4
The text was updated successfully, but these errors were encountered: