Ruby on rails 部署heroku应用程序时,在任何源中都找不到nokogiri-1.11.1
我的第一篇文章在这里!将Rails应用程序部署到Heroku时,我遇到了一个“在任何源代码中都找不到nokogiri-1.11.1”错误。成功地将应用程序推送到我的git存储库后,我在运行“git push heroku master”时收到错误消息。我的ruby版本是2.7.2,rails是6.1.3,bundler版本是2.1.4。谢谢大家!Ruby on rails 部署heroku应用程序时,在任何源中都找不到nokogiri-1.11.1,ruby-on-rails,git,heroku,ruby-on-rails-6.1,Ruby On Rails,Git,Heroku,Ruby On Rails 6.1,我的第一篇文章在这里!将Rails应用程序部署到Heroku时,我遇到了一个“在任何源代码中都找不到nokogiri-1.11.1”错误。成功地将应用程序推送到我的git存储库后,我在运行“git push heroku master”时收到错误消息。我的ruby版本是2.7.2,rails是6.1.3,bundler版本是2.1.4。谢谢大家! remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendo
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote: The git source `git://github.com/rightscale/right_http_connection.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config set git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find nokogiri-1.11.1 in any of the sources
remote: Bundler Output: The git source `git://github.com/rightscale/right_http_connection.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config set git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: Some gems seem to be missing from your vendor/cache directory.
remote: Could not find nokogiri-1.11.1 in any of the sources
.
.
.
remote: ! Failed to install gems via Bundler.
.
.
.
! [remote rejected] master -> master (pre-receive hook declined)
这是Nokogiri的一个已知问题,因为绑定器的默认行为是只缓存开发系统的gem,而不是生产系统的gem,从而导致部署时出错 这可能会解决您的错误
rm -rf vendor/cache
bundle config set force_ruby_platform true
bundle install
您可以找到更多信息。这是Nokogiri的一个已知问题,因为绑定器的默认行为是只缓存开发系统的gem,而不缓存生产系统的gem,从而导致部署时出错 这可能会解决您的错误
rm -rf vendor/cache
bundle config set force_ruby_platform true
bundle install
您可以找到更多信息。它成功了!非常感谢。成功了!非常感谢。