Rails 2.3.9 config.threadsafe! Requires Restart To Reload Templates -------------------------------------------------------------------
Key: JRUBY-5084 URL: http://jira.codehaus.org/browse/JRUBY-5084 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.5.2 Environment: Rails 2.3.9 Reporter: Paul Mucur Assignee: Thomas E Enebo Priority: Minor When using Rails' config.threadsafe! option in config/environments/development.rb, any change to a view (an .html.erb file in app/views) while running the default JRuby WEBrick server in development mode (run with script/server) will not be picked up and the server must be restarted for the change to be visible. Removing the config.threadsafe! option fixes this issue. This does not seem to affect C Ruby (I tested with Ruby Enterprise Edition 2010.02). Interestingly, this problem does not seem to occur with Rails 3. To recreate the issue: 1. Create a new Rails 2.3.9 application ("gem install rails -v2.3.9" and then "jruby -S rails myapp"); 2. Set it up for JRuby (use activerecord-jdbcsqlite3-adapter in config/database.yml); 3. Create a scaffold (so that we have a view to play with) with "jruby -S script/generate scaffold post") and run the migrations with "jruby -S rake db:migrate" 4. Add "config.threadsafe!" to config/environments/development.rb 5. Start the server with "jruby -S script/server" 6. Go to http://127.0.0.1:3000/posts to see the default index view; 7. Add "Hello world" to the top of app/views/posts/index.html.erb and refresh http://127.0.0.1:3000/posts 8. Note that your change is not visible. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email