Worked like a charm,

Thanks a lot!

On Sun, Aug 1, 2010 at 7:52 AM,  <camping-list-requ...@rubyforge.org> wrote:
>
> Message: 8
> Date: Sun, 01 Aug 2010 06:51:52 -0600
> From: Philippe Monnet <r...@monnet-usa.com>
> To: camping-list@rubyforge.org
> Subject: Re: Reloading in a standard config.ru rack app (Camping 2.0)
> Message-ID: <4c556de8.3040...@monnet-usa.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
>  Hi Omar,
>
> When I want to test using rackup instead of the Camping server I use the
> following config.ru assuming that myapp.rb has a MyApp module:
>
> gem 'camping' , '>= 2.0'
> %w(rack activerecord camping camping/session camping/reloader ).each { |
> r | require r}
> reloader = Camping::Reloader.new('myapp.rb')
> app = reloader.apps[:MyApp]
> run app
>
> And when I need to mount static content I also add the following
> statements _before _"run app":
>
> use Rack::Reloader
> use Rack::Static,
>     :urls => [ '/css',
>                     '/css/images'
>                     '/images',
>                     '/js' ],
>     :root => File.expand_path(File.dirname(__FILE__))
>
> Note that this only meant for local testing or in your staging
> environment (for example if you need to make a quick change while
> troubleshooting an issue).
>
> Philippe
>
> On 7/31/2010 6:12 PM, Omar G?mez wrote:
>> Dear Camping ninjas,
>>
>> I've been using Camping via bin/camping and reloading works as expected OK.
>>
>> What I have not been able to do is to correctly setup a Camping app
>> with reloading support in a standard config.ru rack app.
>>
>> Thanks for your attention
>>
>> --Omar G?mez
>>
>

-- 
Follow me at:
Twitter: http://twitter.com/omargomez
Buzz: http://www.google.com/profiles/108165850309051561506#buzz
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to