Skip to content
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

"bin/rails" command in a Rails 4 app directory gives me the "rails new" help message #9715

Closed
nicolasblanco opened this issue Mar 14, 2013 · 7 comments

Comments

@nicolasblanco
Copy link

I'm bootstraping a Rails 4b1 application using Ruby 2 and latest Bundler.

When I run bin/rails command inside the app directory, I get the rails new message as if I was not in a Rails directory.

I switched to master rails without success. I tried to delete all my rails gems without success neither.

@nicolasblanco
Copy link
Author

OK. My bin/rails file looked like this :
https://gist.github.com/slainer68/5160349

I had to replace it with the current template file : https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/bin/rails

But I don't understand why the template wasn't good just after the app generation using the Rails 4b1 gem...

@nicolasblanco
Copy link
Author

OK, that's because I used --binstubs, see : https://gist.github.com/chrismo/5043420

@jherdman
Copy link
Contributor

I don't think you should close this issue. I ran into this too when trying out the Rails 4 beta, and it was confusing as hell to figure out what was going wrong. I think that "$PROJECT/bin/rails" would work as expected, and is a use case that should probably be handled.

@steveklabnik
Copy link
Member

Bundler's old binstubs don't work like the new bundle binstubs do, you need to use one or the other.

@dw2
Copy link

dw2 commented Mar 20, 2014

rake rails:update:bin fixed the issue for me. The repo I was using had /bin in the .gitignore file.

@heidi123p
Copy link

Thanks @dw2 ! That solution worked for me too.

@EverybodyKurts
Copy link

@dw2 This worked for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants