Distributing Rails 3 apps

Scott Seago sseago at redhat.com
Wed Aug 10 14:16:44 UTC 2011


On 08/10/2011 09:03 AM, Chris Lalancette wrote:
> On 08/10/11 - 10:02:41AM, Lukas Zapletal wrote:
>> On 08/08/2011 04:37 PM, Ohad Levy wrote:
>>> 3) Unstitch bundler from the rails3 app
>> According to the Rails 3 Way book the only thing is to remove Gemfile*
>> files and that's it.
>>
>> Unfortunately Rails 3 then starts screaming about unknown constants
>> (unrequired files). It can take some time to fix it and can be difficult
>> for developers to keep requires up-to-date (since they are using Bundler).
> I'll admit I haven't really looked in any detail, but my thought about how
> this would look is something like:
>
> if use_bundler
>     Bundler.require(:default, Rails.env)
> else
>     require 'foo'
>     require 'bar'
>     require 'baz'
>     ...
> end
>
> But maybe that is too simplistic.
>
One annoyance with this is that we have to keep the dep list in 2 places 
here -- the Gemfile and the individual requires list. Perhaps there's no 
way around this, though.

Scott




More information about the ruby-sig mailing list