Debug mode

20 views
Skip to first unread message

Mathias Hablützel

unread,
Aug 16, 2011, 12:48:06 PM8/16/11
to Ramaze
Hi there,

I was wondering if there is a switch to enable ramaze to reload every
file when I hit refresh in the browser.

When I'm writing/testing some code and run into an error, I patch the
line, switch to my terminal, kill ramaze, restart it and then go to the
browser reloading the page. Is there a possibility ramaze doesn't cache
anything (like model, controller etc)

greetings
Mathias

signature.asc

Scott LaBounty

unread,
Aug 16, 2011, 12:57:30 PM8/16/11
to ram...@googlegroups.com
Mathias,

I believe that should be the default unless something's changed recently. Have you tried just refreshing instead of restarting Ramaze?

Scott

2011/8/16 Mathias Hablützel <mathias.h...@gmail.com>



--
Scott
http://steamcode.blogspot.com/

Yorick Peterse

unread,
Aug 16, 2011, 1:02:30 PM8/16/11
to ram...@googlegroups.com
Mathias,

Ramaze comes with Ramaze::Reloader which does exactly that (https://github.com/Ramaze/ramaze/blob/master/lib/ramaze/reloader.rb).
However, if you want to load *all* files you may want to take a look at Shotgun: https://github.com/rtomayko/shotgun

Yorick

--
You received this message because you are subscribed to the Google Groups "Ramaze" group.
To post to this group, send email to ram...@googlegroups.com.
To unsubscribe from this group, send email to ramaze+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ramaze?hl=en.

Mathias Hablützel

unread,
Aug 16, 2011, 2:21:47 PM8/16/11
to ram...@googlegroups.com
Am 16.08.11 18:57, schrieb Scott LaBounty:

> I believe that should be the default unless something's changed recently.
> Have you tried just refreshing instead of restarting Ramaze?

Yes, I tried. It doesn't show the changes.

I added `p something` in my code and it didn't show up in the terminal,
after a restart of ramaze it did.

Mathias

signature.asc

Michael Fellinger

unread,
Aug 16, 2011, 4:44:29 PM8/16/11
to ram...@googlegroups.com

Could you tell us what your OS and Ruby versions are?

Mathias Hablützel

unread,
Aug 16, 2011, 4:58:27 PM8/16/11
to ram...@googlegroups.com
Mac OS X 10.6.8 with Ruby 1.8.6.

Michael Fellinger <m.fel...@gmail.com> wrote:

>--
>You received this message because you are subscribed to the Google
>Groups "Ramaze" group.
>To post to this group, send email to ram...@googlegroups.com.
>To unsubscribe from this group, send email to
>ramaze+un...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/ramaze?hl=en.

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Mathias Hablützel

unread,
Aug 19, 2011, 10:21:19 AM8/19/11
to ram...@googlegroups.com
Am 16.08.11 19:02, schrieb Yorick Peterse:

> Ramaze comes with Ramaze::Reloader which does exactly that (
> https://github.com/Ramaze/ramaze/blob/master/lib/ramaze/reloader.rb).

I don't get it how to use it, sorry. Where do you put it? In the
controller-class? Do you have an example somewhere?

> However, if you want to load *all* files you may want to take a look at
> Shotgun: https://github.com/rtomayko/shotgun

Shotgun did the trick … except … it allways loses the session! :-D

Thanks!

signature.asc

Yorick Peterse

unread,
Aug 19, 2011, 1:47:54 PM8/19/11
to ram...@googlegroups.com
Mathias,

Ramaze::Reloaded is used as a middleware and is loaded by default for the :dev
environment. The reason shotgun makes you lose your sessions is that by default
these are stored in memory. Because Shotgun clears the memory after each request
it will also remove any active sessions. A way around this would be to use
something such as the Memcached or Sequel. (Ramaze::Cache::MemCache and
Ramaze::Cache::Sequel).

Yorick

2011/8/19 Mathias Hablützel <mathias.h...@gmail.com>
Reply all
Reply to author
Forward
0 new messages