GithubHelp home page GithubHelp logo

Can't launch `rails server` about hotel HOT 7 CLOSED

typicode avatar typicode commented on May 13, 2024
Can't launch `rails server`

from hotel.

Comments (7)

jalada avatar jalada commented on May 13, 2024 2

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.

from hotel.

typicode avatar typicode commented on May 13, 2024

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.

from hotel.

joshuaswilcox avatar joshuaswilcox commented on May 13, 2024

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
  }
}%

from hotel.

typicode avatar typicode commented on May 13, 2024

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?

from hotel.

joshuaswilcox avatar joshuaswilcox commented on May 13, 2024

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

from hotel.

typicode avatar typicode commented on May 13, 2024

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.

from hotel.

mattvague avatar mattvague commented on May 13, 2024

For anyone still stuck, the following worked for me: hotel add 'rails server --port $PORT -b 127.0.0.1'

from hotel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.