Making Merb 1.0 RC1 Play Nice With Passenger
MerbCamp wrapped up last weekend, and we were given Merb 1.0 RC1 . So I dove right in and upgraded a couple apps from 0.9.8, and everything was fine until I deployed the apps in production under Passenger . The first thing is merb now comes with a public/.htaccess file, and there are a couple lines we need to comment out in here so that Passenger doesn't use fcgi. Make sure the following lines are commented out in your public/.htaccess file
#RewriteRule ^(.*)$ merb.fcgi [QSA,L]
There is no need for fcgi behind Passenger since Passenger uses rack. Now you should be able to deploy your app behind Passenger without many problems. There is still one problem you may come across. For some reason you can't have local variables set in a controller or your app will fail with the following error message
/usr/local/lib/rubyEE/lib/ruby/gems/1.8/gems/ParseTree-2.2.0/lib/parse_tree.rb:151:
[BUG] Segmentation fault
So instead of this
def show
@post = Post.get(params[:id])
number = 100
number = number + 100
end
You would need to do this
def show
@post = Post.get(params[:id])
@number = 100
@number = @number + 100
end
I have not yet figured out why local variables cause the segmentation fault, but this is a quick way to get around it so that you app will still work.
I am also new here and i am still in the process of learning things in this site. I just accidentally saw the site and i registered
http://ezinearticles.com/?Max-Acai-Boost-Review---Do-Max-Acai-Boost-Supplements-Really-Work?&id=2927928