rails 3.2.9 regression affecting moonshine...?

71 views
Skip to first unread message

Josh

unread,
Oct 31, 2012, 7:12:13 PM10/31/12
to railsmachin...@googlegroups.com
My app is 3.2.8 and I have this in my environment.rb:

Rails.configuration.paths['app/manifests'] = 'app/manifests'

...I'm not really sure what it does, I *thought* it did something like exclude app/manifests from the autoload path - but reading what it says, that doesn't seem to make sense.  Regardless of what I think it's supposed to do, that line allows my app to run, and my tests to run.  Without it, I get errors about shadow_puppet not being installed in dev and in test even though it is installed.

That all said, 3.2.9.rc1 breaks my app in a similar way (No such file to load -- shadow_puppet)
rm -rf app/manifest/ makes things work again in dev and test, but that's not such a hot solution.

Can we relocate application_manifest somehow?

Looks like it's relatively hardcoded right now:


Thoughts?

<3 yous guys,
Josh

P.S., I wrote all of that, and then changed "app/manifests" to "lib/manifests" in capistrano_integration.rb and moved the folder/file and all things are merry again.



Josh Nichols

unread,
Nov 1, 2012, 12:50:49 PM11/1/12
to railsmachin...@googlegroups.com
Hi Josh

Can you try this in your config/application.rb (after removing that bit in environment.rb)?

# don't attempt to auto-require the moonshine manifests into the rails env
config.paths['app/manifests'] = 'app/manifests'
config.paths['app/manifests'].skip_eager_load!

I grabbed this from the generator (https://github.com/railsmachine/moonshine/blob/master/lib/generators/moonshine/moonshine_generator.rb#L31-33), which means that new applications would get this by default. Was this a fresh 3.2.9rc1 app, or was it an existing app upgraded?

I'd rather not have to manifests out of app/manifests if we can avoid it.

- Josh

--
You received this message because you are subscribed to the Google Groups "Moonshine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/railsmachine-moonshine/-/HnPih2ioClsJ.
To post to this group, send email to railsmachin...@googlegroups.com.
To unsubscribe from this group, send email to railsmachine-moon...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/railsmachine-moonshine?hl=en.

Josh

unread,
Nov 5, 2012, 6:06:02 PM11/5/12
to railsmachin...@googlegroups.com
Negative.  Tried with 3.2.9.rc2.

Hi Josh


- Josh

To unsubscribe from this group, send email to railsmachine-moonshine+unsub...@googlegroups.com.

Josh Nichols

unread,
Nov 8, 2012, 9:45:09 AM11/8/12
to railsmachin...@googlegroups.com
Bummer :( The API around paths and ignoring things has changed a few times, so I'm not super surprised it's broken. It is extra not awesome that it's a regression on a patch release though.

We'll have to dig into it more to figure out what changed, or if not, how to support all of the rails versions with ignoring app/manifests.

- Josh


To post to this group, send email to railsmachin...@googlegroups.com.
To unsubscribe from this group, send email to railsmachine-moon...@googlegroups.com.

Josh Sharpe

unread,
Nov 8, 2012, 9:57:04 AM11/8/12
to Moonshine
Guess I have to come back to...  why do manifests need to be inside /app?  Couldn't it just as easily be in lib and therefore be outside the default autoload paths?   My hack of moving it out worked pretty well.

Josh Nichols

unread,
Nov 8, 2012, 9:59:01 AM11/8/12
to railsmachin...@googlegroups.com
The same reason models/controllers/views are in app. They are part of the application. lib is generally considered to be used for generic code that could feasibly be abstracted.

- Josh

Josh Sharpe

unread,
Nov 8, 2012, 12:15:32 PM11/8/12
to Moonshine
Here's the offending commit:


working on why it breaks things now.

Josh Sharpe

unread,
Nov 8, 2012, 2:12:51 PM11/8/12
to Moonshine
So, it seems that this is a 3.2.9 regression,  submitted a patch and folks seem to agree.  Follow here if you're interested: https://github.com/rails/rails/pull/8146

Also, I think the correct API for skipping a path is this:

config.paths.add('app/manifests', :eager_load => false)

We should probably update moonshine's template to use that instead?  They both work, but what's in the template now is a bit hackey.

Jamie Orchard-Hays

unread,
Nov 8, 2012, 3:32:53 PM11/8/12
to railsmachin...@googlegroups.com
Nice work!

Josh Nichols

unread,
Nov 8, 2012, 4:06:25 PM11/8/12
to railsmachin...@googlegroups.com
Very yes!

I think the main thing is getting something that works consistently across Rails 3.x versions. One thing that's unfortunate is it changed between 3.0 and 3.1 (iirc), and that means you always hit that problem going into Rails 3.1 upgrades.

Maybe that could be moved to a railtie instead of being a generated thing?

- Josh
Reply all
Reply to author
Forward
0 new messages