-
Notifications
You must be signed in to change notification settings - Fork 20
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
Start task invokes environment, environment errors if it can't connect to the server #14
Comments
Yup, I think you're in the right place ;) So could you share some examples of the commands / output? The rake tasks shouldn't depend at all on the Rails environment. The server is installed by default in Thanks! |
Okay great! In the course of writing this up I think I figured out what happened. Here's the start of my process: What I've done: Edit the Gemfile and add: Per the "Install in Ruby on Rails" section at http://neo4jrb.io/ edit config/application.rb and add:
Then run: The result is:
Which is a problem I remember from working on it before. I think the fix I found was to add That done, running the install rake task again gives me another error:
At this point I noticed that a lot of the rake tasks had definitions like
So what I take from this is that the app will fail to boot if it can't connect, and that using binstubs with spring will always boot the app even if the rake task doesn't call for it. I don't think that means anything to fix in this project. Do you think it makes sense to note this in another project or change the boot process? |
I just realized that a number of the links on neo4jrb.io are pointing to our old documentation. The new docs are here: http://neo4jrb.readthedocs.org/ I've just fixed that now. The new documentation has a pretty good section which covers setup in Rails: http://neo4jrb.readthedocs.org/en/stable/Setup.html#ruby-on-rails It talks about adding the rails new myapp -m http://neo4jrb.io/neo4j/neo4j.rb -O As to your problem: I was actually briefly fooled by the And yeah, that is really puzzling... I have an app that I just tested with and Everything that you wrote seems fine, but there's one small thing which might be wrong that I would suggest looking at: You said you added Small note: If you don't plan on using require "active_model/railtie"
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
require 'neo4j/railtie'
require "rails/test_unit/railtie" |
I reviewed the
so I think the requires are in the right order. Just to confirm, when you springify an app are you invoking rake with the binstubs in the bin directory? With spring installed here are the working and not working commands side by side:
Actually, looking at
I'm satisfied that this is a setup issue in my environment. If someone brings it up again then at least we'll know why. Thanks for the support and the tips on involving it, FWIW my primary use now is as a backup DB for recommendations so I'm happy to have ActiveRecord in there. |
Hi, I'm sorry to start this off with a vague statement and no test, hopefully this is the right project and sounds familiar enough.
In my project, after updating the rails application config I could not start the server via the rake task - instead I got an error that it could not connect to the server. I suspect it is because the start task is invoking the rails environment task somewhere and it is set to connect on boot.
Does that sound plausible? For now I've addressed it by monkey patching the Railtie to catch the exception and setting the connection timeout to very low.
The text was updated successfully, but these errors were encountered: