Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Gemfile ROR版本和本地计算机ROR版本不匹配_Ruby On Rails_Ruby_Heroku - Fatal编程技术网

Ruby on rails Gemfile ROR版本和本地计算机ROR版本不匹配

Ruby on rails Gemfile ROR版本和本地计算机ROR版本不匹配,ruby-on-rails,ruby,heroku,Ruby On Rails,Ruby,Heroku,我是ROR和heroku的完全初学者。目前,我正在尝试使用bitbucket的git创建一个应用程序,我的gemfile版本(2.2.3)与我的RubyonRails版本2.3.1不同 我可以采取哪些步骤来确保我的文件可以更改 gemfile中的这种不匹配导致我的“git push heroku master”失败,并出现以下错误 安装mime类型(3.0)时出错,绑定程序无法启动 远程:继续。 非常感谢你!(:Ruby 2.3有点像,所以我建议安装它,但是如果你不想- 在Gemfile或.ru

我是ROR和heroku的完全初学者。目前,我正在尝试使用bitbucket的git创建一个应用程序,我的gemfile版本(2.2.3)与我的RubyonRails版本2.3.1不同

我可以采取哪些步骤来确保我的文件可以更改

gemfile中的这种不匹配导致我的“git push heroku master”失败,并出现以下错误

安装mime类型(3.0)时出错,绑定程序无法启动 远程:继续。


非常感谢你!(:

Ruby 2.3有点像,所以我建议安装它,但是如果你不想-

在Gemfile或
.ruby version
文件中,可能会有一行写着
ruby 2.3.1
。暂时将其更改为已安装的版本2.2.3

如果您想跳过标记为仅属于
生产
组的gem,请运行
捆绑包
,或者可能是
捆绑包--不带生产
。例如,如果您没有在本地安装postgres

然后将您的Gemfile或
.ruby版本
切换回2.3.1。提交并尝试推送

这有什么作用?它使heroku的ruby版本保持在2.3,但使用您安装的版本安装
Gemfile.lock
。据我所知,heroku只需要
Gemfile.lock
用于开发gems

顺便说一下,我假设您使用的是rubyVersion2.2.3,而不是Rails版本。当前的Rails版本是4.x.x或5.x.x。要运行Rails 2.x.x,您可能需要降级到ruby 1.8.7或其他版本