-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't start serve on a different port #49
Comments
Bah, figured it out. I had to remove this line from the generated config.ru: #\ -p 4000 |
Is there a reason why that line is there? |
In this case Serve is just delegating to the rackup command. You need to edit your config.ru. The very first line tells it which port to start. John Long On Sep 5, 2011, at 4:47 PM, [email protected] wrote:
|
Right, but why is is this line here? https://github.com/jlong/serve/blob/master/lib/serve/bootstrap/config.ru#L1 Everyone who wants to run serve on a different port will need to know to remove that line if they want to follow the documentation in the README. |
Well, the assumption here is that if you have a project with a config.ru in it that you know which port you want it to run on, so if you want to change it, you'd change it in the config.ru. But perhaps the -p option should override as you suggest. In fact, I'm leaning that way now that you've talked me through it. This month is kind of busy for me so I don't have a lot of time to work on Serve, but I'd merge a pull request if you send one my way. It's probably just a matter of making sure the port is handed over to the Otherwise, it'll be a bit before I get to it. --John On Sep 6, 2011, at 12:29 AM, joevandyk wrote:
|
This looks like it might be in the rackup command itself. You're passing the user-supplied port in
|
Even when I change
|
So what's the verdict? Should we remove the port from the config.ru? Honestly it seems really strange to me to have it hardcoded in there. |
Yes. I still want the rails_app? checks in there though. That stuff should be updated for Rails 3 though. The idea is that serve can be used to start any rack or rails app, too. |
It's running on port 4000, I'd expect it to use port 2100.
The text was updated successfully, but these errors were encountered: