running unicorn under rvm
normalperson at yhbt.net
Tue Aug 17 21:08:50 EDT 2010
Joseph McDonald <superjoe at gmail.com> wrote:
> I'm sure I'm running the right version of unicorn.
> what's weird is if I remove the reference to TOPLEVEL_BINDING, it works, i.e.:
> host, port, set_listener, options, daemonize =
> eval("[ host, port, set_listener, options, daemonize ]")
> works, it gets the right port from the config.ru file.
Hm... I'm stumped. However, you're really encouraging me to pause other
projects, work on 2.0 and release it this week/weekend :) I suppose
some of the crazier 2.0 stuff I proposed can wait until 3.x.
> my config.ru file looks like"
> #\ -w -p 4452
> require './mystuff'
> run Sinatra::Application
> another strange thing: I need to add the "./" in front of mystuff,
> but when i'm not using rvm (rvm use system), I don't need to do that.
Odd... needing the './' feels like it's using Ruby 1.9.2 or later...
Can you print out RUBY_VERSION in there to be certain?
I just tried rvm for the first time with a fresh user/home directory on my
system and everything works as expected with 1.8.7 (it just picked p302, not
p299, but that shouldn't make a difference...).
> I'm curious if anyone else is using unicorn with rvm and not having
> this problem. I'm guessing it's something weird with my system, but
> not sure.
If you have root on your machine, just try creating a new user and start
with a blank $HOME. I often do that to narrow things down when
debugging/testing code and don't feel like going all the way with chroot
More information about the mongrel-unicorn