Closed selfagency closed 8 years ago
Could you try this please?
hotel add 'rails server --port $PORT' -e GEM_PATH
As far as I remember, I think that rvm
also modifies GEM_PATH
.
-e
will add GEM_PATH
to the <server>.json
config file.
That didn't fix it for me, still getting an error, a different one, but another error.
Bundler::GitError: {INTERNAL COMPANY GEM} is not yet checked out. Run `bundle install` first
after doing
hotel add 'bundle exec rails server' -p 3000 -o app.log -e GEM_PATH
with a config of:
{
"cwd": "/Users/jwilcox/webapps/appname",
"cmd": "bundle exec rails server",
"out": "app.log",
"env": {
"PATH": "/Users/jwilcox/.rvm/gems/jruby-1.7.13/bin:/Users/jwilcox/.rvm/gems/jruby-1.7.13@global/bin:/Users/jwilcox/.rvm/rubies/jruby-1.7.13/bin:/Users/jwilcox/.rvm/bin:/Users/jwilcox/.jenv/shims:/Users/jwilcox/.jenv/bin:/Users/jwilcox/bin:/usr/local/Cellar/php55/5.5.33/sbin:/Users/jwilcox/lunasa/jsp/lib:~/.cabal/bin:/Users/jwilcox/Library/Haskell/bin:/Applications/Postgres.app/Contents/Versions/9.3/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/share/npm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jwilcox/gocode/bin:/Applications/P4Merge.app/Contents/MacOS:/usr/local/bin/elixir/bin",
"GEM_PATH": "/Users/jwilcox/.rvm/gems/jruby-1.7.13:/Users/jwilcox/.rvm/gems/jruby-1.7.13@global",
"PORT": 3000
}
}%
Hi,
I'm not familiar with this error.
Does running bundle install
and restarting the project from hotel.dev/localhost:2000 makes a difference?
Can I reproduce if I install Rails, JRuby and create a new Rails project or do I need to install other things?
Running bundle install does not help, the app starts fine when manually running rails s
. Interestingly it is only happening with jRuby, MRI ruby seems to work fine. You might be able to reproduce if you install jruby with RVM (i think that might be part of the problem), and Rails, shouldn't need anything else
Thank you for the feedback. Hotel does nothing special except running cmd
with the provided environment env
. So I guess it must be related to some environment variable. I'll give it a try.
I use RVM (and foreman, though that's less relevant) for my Ruby projects and I managed to get mine to start using the command:
hotel add 'foreman start' -e GEM_HOME
I may end up adding other environment variables, but GEM_HOME
and PATH
were enough for me for now.
For anyone still stuck, the following worked for me: hotel add 'rails server --port $PORT -b 127.0.0.1'
Here's my server json file:
And here's the error I get:
I have way more than 15 gems installed, including the one it's looking for: