This repository has been archived by the owner on Oct 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Home
langalex edited this page Jan 10, 2011
·
23 revisions
Welcome to the culerity wiki!
- try this: http://gist.github.com/268216
- this might be newer: http://rvm.beginrescueend.com/integration/culerity/
if you get an error message from the jruby process that some gems could not be found, try setting this in your env.rb
Culerity.jruby_invocation = 'RUBYOPT="" ' + File.expand_path("~/.rvm/bin/celerity_jruby")
you are probably using the (old) rubyforge version of celerity. try the github version instead. (thanks to @jamescallmebrent)
this has been reported by @josevalim and i haven’t been able to reproduce this. here’s his solution: add an exit(0) call to the on_exit block in common_celerity.rb
at_exit do $browser.exit $server.close exit(0) end
I’ve also had this happen to me under 10.5.7 — @Caius
jRuby v1.5 (and, I think, v1.4) has an option called nailgun that spawns a JVM that all other instances of jruby then connect to. This saves the boot time for a JVM each time you run a jruby command. This can make culerity run significantly faster. To setup:
- Run
jruby --ng-server
in a separate shell - Make sure the jruby call that culerity uses passes the
--ng
flag. Perhaps the easiest way to do this is to setENV["JRUBY_OPTS"]="--ng"
- You’re done! First time through you won’t notice any difference, but subsequent runs should be much faster.
-
NOTE: Passing the
--ng
option without first setting up the nailgun server will cause this error:connect: Connection refused
- If you have problems with old mails appearing in the mail queue then you can find a proposed fix here: https://github.com/langalex/culerity/issues#issue/1 . As of culerity 0.2.12 / 16. Nov. 2010 that problem is not yet fixed in the git repository.
- See this thread
One solution is to use RVM, the other to install culerity in jruby’s path:jruby -S gem install culerity
- modified timecop by @liangzan: freeze time even across processes, i.e. you can call timecop to change the time in the rails webserver process
- if you need to test sending of mails, then you need to set
config.action_mailer.delivery_method = :persistent
inside yourenvironments/culerity.rb
. You can find the rationale here: http://groups.google.com/group/culerity-dev/browse_thread/thread/6326c447c5d8706c .