Sinatra on Dreamhost!
Hello, Finally you can host all those sinatra apps you have been building on Dreamhost. They have Phusion Passenger 2.0 RC 2 and it can run Rack based apps like Sinatra, Merb, Camping, etc.. I had to do some hacking to get this to work for some reason doing require ‘sinatra’ was not loading, so I had to do an absolute require and then it all worked great. I created something simple with Sinatra being hosted on Dreamhost. check it out! modrails.fernyb.net
July 5th, 2008 at 1:37 pm
Did you use the supplied config.ru files from the passenger website?
I tried to get this working with Merb a little while back, and had some problems, but I felt as if I was close. I too was having some require problems. Could you share any more specifices with me as to how you got this running?
July 5th, 2008 at 2:44 pm
@taelor, this is what I did,
1. Install Ruby and RubyGems on my shared account.
2. Install any gems I will be requiring.
3. Set the ENV variables in the config.ru so when you do a require ‘rubygems’ or require ‘sinatra’ it can find YOUR installed gems.
If you want to see the code that I use for config.ru I have pasted it on pastie.
http://pastie.org/228319
For installing Ruby and RubyGems I followed this article:
http://nateclark.com/articles/2006/10/20/dreamhost-your-own-packages-and-gems
except you need to download the gems and install them locally by using
“gem install -l gemame.gem”
let me know if this helps.
July 5th, 2008 at 6:41 pm
still no luck, i emailed you back with more explinations.
July 5th, 2008 at 7:43 pm
@Taelor, I have merb installed check it out -> http://modrails.fernyb.net
July 14th, 2008 at 12:07 pm
fernyb,
there is now an error with passenger:
“no such file to load — merb-core”
hope you figure it out because I’m interested in trying sinatra and merb on my DH account!
Micah
July 17th, 2008 at 11:49 am
Did you know guys that you can do (nc joyent.com 80 GET / HTTP/1.1) on joyent servers and they have a cool message in http headers. like
Served-By: Joyent
With: SecretSauce
August 24th, 2008 at 6:04 am
I see it can’t find merb-core. Does it work if you freeze Merb into your app? I’m considering getting a DH accout for a Merb app and would love to see this working.
August 24th, 2008 at 7:44 am
@Shawn, it works. Sometimes it will say merb-core not found but if you refresh, it will be all fine. That is the only weird issue…
The way I solved this issue for myself at least, was by using a cronjob that will just curl my site every 45 minutes because I think it is 60 minutes it will restart when there is no activity otherwise it just stays up.
August 24th, 2008 at 9:11 am
That’s great. Thanks!