1
votes

I just upgraded to Ruby 1.9.3-p374 on my development machine. Now, when I start Rails with foreman start, it uses port 5000.

Here is my Procfile:

web: bundle exec rails server thin -p $PORT -e $RACK_ENV

My .env:

RACK_ENV=development
PORT=3000

Why is it giving me port 5000, and how can I change it back?

1
Sounds like your .env file is not being read. Are you in the same directory as the .env file? Foreman uses 5000 as the default port. Does it work on 3000 if you supply that in your Procfile?jordelver
The .env and the Procfile are in the same directory. If I put 3000 in my Procfile, it works fine.bevanb
What version of Foreman are you using?jordelver
It was using the version installed under my old ruby directory- I hadn't installed it again since upgrading, I'd forgotten it wasn't in my gemfile. Installing it again worked.bevanb

1 Answers

1
votes

It was using the version installed under my old ruby directory- I hadn't installed it again since upgrading, I'd forgotten it wasn't in my gemfile. Installing it again worked.