Rails Gemfile.lock - gem windows version against Linux

Looking at my Gemfile.lock , I found the gem specified in the Windows version. This is because I am developing in a Windows environment (I know what I can say?). Unfortunately, I'm using a hero, which is a Linux environment. This will cause the application to crash.

I found a workaround : removing Gemfile.lock, and then committing and clicking.

But is this solution not very good? I mean, this is like fixing a windscreen with duct tape.

I was wondering if you guys found a solution that is more elegant for this environment problem that won't force me to manipulate the files.

Thank you in advance.

+4
source share
2 answers

Gemfile.lock should be in the original control, and, I think, you see a warning to the hero that Gemfile.lock will appear soon. What are you doing then?

It's not all black, my collaborators are as bad as you, stuck on windows;) Some use Linux, others Mac. Our Gemfile.lock is as follows

 GEM remote: http://rubygems.org/ specs: ... sqlite3-ruby (1.3.1) sqlite3-ruby (1.3.1-x86-mingw32) 

Heroku, on the other hand, ignores sqlite3, so this might not be the best example. What pearl are you fighting?

I suggest you try manually inserting a gem with x86, as in the example above. Hope this helps ...

+1
source

Actually the solution is to add a line

 Gemfile.lock 

before .gitignore

0
source

All Articles