-
Notifications
You must be signed in to change notification settings - Fork 752
Initialize railtie for all groups #40
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
Conversation
Without `:group => :all` you can't `rake assets:precompile` when you have `config.initialize_on_precompile = false`.
Hi!, @sickill thanks for this! I have to ask @rolfb to sign the CLA https://developers.facebook.com/opensource/cla to credit him for this change (Facebook policy). If that's a lot of hassle to him, then I'll close this PR and make this change myself - it will also apply to all current branches (0.9, 0.10, 1.0). |
Update: I have noticed that with this change assets precompilation works fine but you can't start server nor console (in production env). Let's hold with merging this. |
The build failed, so apparently using the group :assets is too exclusive? |
Hi! @rolfb |
@sickill will have to elaborate on the why's on running server/console not starting in production. I'm off to bed. Revisiting tomorrow. On Mon, Apr 14, 2014 at 1:17 AM, Jakub Malinowski
|
With both
When I move This is all on Rails 3.2.17 app (Gitorious). |
What's wrong with |
@sickill @rolfb Second:
And if you run Current master solves that with defaulting variant for React, also I think that the workaround you need is obvious. |
Sounds good to me. Thanks Jakub. On ons., apr. 16, 2014 at 2:05 AM, Jakub Malinowski <notifications@github.com="mailto:notifications@github.com">> wrote: First of all: master is not production ready yet. Second: The problem is in your code, but the underlying reason is the unfortunate choice of not defaulting React's variant when it is not explicitly defined. You line #65 is: config.react.variant = :production And if you run RAILS_ENV=production bundle exec rails c with react-rails in assets group, then it is not loaded, and config.reactis undefined. Current master solves that with defaulting variant for React, also I think that the workaround you need is obvious. I will apply group: :all to all branches soon. Should you need any help, let me know. — |
Is there any update on how to resolve this issue? I'm not being able to run assets:precompile successfully on rails 3.2.17 using react-rails 0.10. |
@dferrazm Could you check using |
@dferrazm have you tried the solution I described? |
I managed to get it working by moving the gem out of the assets group and
|
Sorry that I disappeared - I'll verify and close this soon. This gem cannot be in assets group only, and initialize_on_precompile was needed because the react's version was not inferred from environment version - this should not longer be the case but let me verify first. |
I hope these problems are resolved with #187, please reopen if this is still an issue! |
Without
:group => :all
you can'trake assets:precompile
when youhave
config.initialize_on_precompile = false
.I'm not sure if there are any downsides for doing this but it seems to be working fine for us.