Hi guys,
I am getting the following error after running the bundle install and after committing changes:
ERROR: You have uncommitted code. Please commit or stash your changes before continuing
ERROR: react_on_rails generator prerequisites not met!
Any thoughts?
Did make sure that git status reports no uncommitted files?
Just do a git stash or git commit -am WIP
Thanks @justin808. Yes I did. I did both git stash and git commit -am and still get the same error.
what does git status show?
what version of React on Rails? Mac OS?
My apology for belated reply.
Here is the git status result: modified: Gemfile.lock
I am on 5.1.0, and I am running El Capitan 10.11.2.
This time it worked after I committed the changes, but trust me it did not work on several occasions. It kept throwing an error as above.
Got the same error:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
$ rails generate react_on_rails:install
Running via Spring preloader in process 42462
ERROR: You have uncommitted code. Please commit or stash your changes before continuing
ERROR: react_on_rails generator prerequisites not met!
Using react_on_rails 5.2.0 on El Capitan 10.11.4
After I removed the spring gem from my Gemfile and did:
$ bundle install
$ spring stop
And I was able to run the generator.
The point is the the generator will will not run if you have open changes. This is so you can carefully see what the generator is changing.
I hated this stuff. It also prohibit from installing if you have untracked files.
@juhat There's an option in the generator to ignore the error.
Oh, dear. Good. I was tired to find it, however this is still super annoying and does not seem to be a good practice.
No offense, I appreciate that you put a lot of effort into this gem. Thanks for doing it!
I updated the README.md.
Commit this to git (you cannot run the generator unless you do this or pass the option
--ignore-warnings).
Most helpful comment
Got the same error:
Using react_on_rails 5.2.0 on El Capitan 10.11.4
After I removed the spring gem from my Gemfile and did:
$ bundle install$ spring stopAnd I was able to run the generator.