看着我的Gemfile.lock ,我发现了一个用windows版本指定的gem。 那是因为我在Windows环境下开发(我知道,我能说什么?)。 不幸的是,我使用的是heroku,这是linux环境。 这会导致应用程序崩溃。
我找到了一个解决方法 :删除Gemfile.lock,然后提交和推送。
但是这个解决方案不是很好吗? 我的意思是,就像用胶带固定防风罩一样。
我想知道如果你们发现了一个更适合这种环境问题的解决方案 ,那就不会强迫我操纵文件。
提前,谢谢。
Looking at my Gemfile.lock, I found a gem specified with a windows version. That is because I develop under a windows environment (I know. What can I say ?). Unfortunately, I use heroku, which is linux environment. This cause the app to crash.
I found a workaround : deleting the Gemfile.lock and then committing and pushing.
But this solution is not great right ? I mean, it's like fixing a wind shield with duct tape.
I was wondering if you guys have found a solution more elegant for this environment problem, that will not force me to manipulate files.
In advance, thanks.
最满意答案
Gemfile.lock应该在源代码控制中,我想你会看到Hermkus警告Gemfile.lock很快就会被需要。 那你怎么办呢?
这不全是黑色,我的合作者和你一样不幸,被困在窗户上;)有些人使用Linux,其他人使用Mac。 我们的Gemfile.lock看起来像这样
GEM remote: http://rubygems.org/ specs: ... sqlite3-ruby (1.3.1) sqlite3-ruby (1.3.1-x86-mingw32)另一方面,heroku会忽略sqlite3,所以这可能不是最好的例子。 你挣扎着什么类型的宝石?
我建议你尝试手动插入x86的Gem,就像上面的例子。 希望这可以帮助...
Gemfile.lock should be in source control and I guess you're seeing herokus warning that Gemfile.lock will soon be required. What do you do then?
It's not all pitch black, I have collaborators as unfortunate as you, being stuck on windows ;) Some use linux, others Mac. Our Gemfile.lock looks like this
GEM remote: http://rubygems.org/ specs: ... sqlite3-ruby (1.3.1) sqlite3-ruby (1.3.1-x86-mingw32)On the other hand, heroku will ignore sqlite3, so this might not be the best example. What type of gem are you struggling with?
I suggest you try manually inserting the gem with the x86, like in the above example. Hope this helps...
rails Gemfile.lock - gem windows版本与linux(rails Gemfile.lock - gem windows version versus linux)看着我的Gemfile.lock ,我发现了一个用windows版本指定的gem。 那是因为我在Windows环境下开发(我知道,我能说什么?)。 不幸的是,我使用的是heroku,这是linux环境。 这会导致应用程序崩溃。
我找到了一个解决方法 :删除Gemfile.lock,然后提交和推送。
但是这个解决方案不是很好吗? 我的意思是,就像用胶带固定防风罩一样。
我想知道如果你们发现了一个更适合这种环境问题的解决方案 ,那就不会强迫我操纵文件。
提前,谢谢。
Looking at my Gemfile.lock, I found a gem specified with a windows version. That is because I develop under a windows environment (I know. What can I say ?). Unfortunately, I use heroku, which is linux environment. This cause the app to crash.
I found a workaround : deleting the Gemfile.lock and then committing and pushing.
But this solution is not great right ? I mean, it's like fixing a wind shield with duct tape.
I was wondering if you guys have found a solution more elegant for this environment problem, that will not force me to manipulate files.
In advance, thanks.
最满意答案
Gemfile.lock应该在源代码控制中,我想你会看到Hermkus警告Gemfile.lock很快就会被需要。 那你怎么办呢?
这不全是黑色,我的合作者和你一样不幸,被困在窗户上;)有些人使用Linux,其他人使用Mac。 我们的Gemfile.lock看起来像这样
GEM remote: http://rubygems.org/ specs: ... sqlite3-ruby (1.3.1) sqlite3-ruby (1.3.1-x86-mingw32)另一方面,heroku会忽略sqlite3,所以这可能不是最好的例子。 你挣扎着什么类型的宝石?
我建议你尝试手动插入x86的Gem,就像上面的例子。 希望这可以帮助...
Gemfile.lock should be in source control and I guess you're seeing herokus warning that Gemfile.lock will soon be required. What do you do then?
It's not all pitch black, I have collaborators as unfortunate as you, being stuck on windows ;) Some use linux, others Mac. Our Gemfile.lock looks like this
GEM remote: http://rubygems.org/ specs: ... sqlite3-ruby (1.3.1) sqlite3-ruby (1.3.1-x86-mingw32)On the other hand, heroku will ignore sqlite3, so this might not be the best example. What type of gem are you struggling with?
I suggest you try manually inserting the gem with the x86, like in the above example. Hope this helps...
发布评论