Yesterday I pushed the changes introducing the Multiline editor to REST in Place I announced last week.
The definition of forms for editing inline-content is now separated from the Code that deals with Ajax and editing state.
This makes it very easy to extend REST in Place with your own Editors.
I also decided to keep the jQuery backwards compatibility for a bit longer.
Check out the changes at http://github.com/janv/rest_in_place.git
Today, the Rails team finally released the first beta of Rails 3.
Trying to play around with it, I experienced a very annoying problem with mongrel:
Per default, Rails seems to only work with the gems listed in its Gemfile, which means that it starts using webrick.
I wanted it to use mongrel, like Rails 2 does and added gem "mongrel" to my gemfile which resulted in rails server just freezing.
The cuplrit was some of the weirdest piece of code I’ve ever seen, mongrel’s Mongrel::Gems.require function:
def require(library, version = nil)
begin
Kernel.require library
rescue LoadError, RuntimeError => e
begin
# ActiveSupport breaks ‘require’ by making it always return a true value
Kernel.require ‘rubygems’
version ? gem(library, version) : gem(library)
retry
rescue Gem::LoadError, LoadError, RuntimeError
# puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
end
end
end
An infinite loop with the only way out being an exception that never got thrown!
This madness was called from mongrel.rb:
$LOAD_PATH.unshift ‘projects/mongrel_experimental/lib/’
Mongrel::Gems.require ‘mongrel_experimental’, ">=#{Mongrel::Const::MONGREL_VERSION}"
Removing these two lines solved the issue. That would have meant patching my gems however, and that smells like something you should not do. The final solution was simple and posted in the comments of the Rails 3 Beta announcement by Juanma Cervera. I just needed to add 3 more lines to my Gemfile:
gem "mongrel"
gem "cgi_multipart_eof_fix"
gem "fastthread"
gem "mongrel_experimental"