强制依赖旧版本 gem
Forcing older version of dependent gem
我正在开发的应用程序突然停止部署到 Heroku,出现错误:
remote: Gem::InstallError: execjs requires Ruby version >= 2.0.0.
remote: An error occurred while installing execjs (2.5.1), and Bundler cannot continue.
remote: Make sure that `gem install execjs -v '2.5.1'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
Ruby 2.0 对我来说不是一个可行的选择(我别无选择,只能在 MS Windows 上开发,而且太多 Ruby 2.0 的东西对 Windows 我上次看的时候),但我认为我不需要 execjs -v2.5.1。我没有在我的 gemfile 中明确调用它,如果我 运行 gem dependency execjs --reverse-dependencies
我得到:
Gem execjs-1.4.0
multi_json (~> 1.0)
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
sprockets-2.12.3 (execjs (~> 1.0, develo
sprockets-2.11.0 (execjs (~> 1.0, develo
sprockets-2.1.3 (execjs (~> 1.0, develop
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.2.1
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.2.2
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.3.0
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.4.0
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
看起来我不需要 v2.4.0 之后的任何东西(我没看错吗?)但是我如何告诉我的 gems 使用旧版本,而不是最新版本?
尝试在 Gemfile 中锁定您的 execjs 版本:
gem 'execjs', '2.4.0'
您可以像这样在 Gemfile 中指定 gem 版本:
gem "haml-rails", "~> 0.3.4"
或(特定版本)
gem "haml-rails", "0.3.4"
有关详细信息,请单击此处:
Meaning of tilde-greater-than (~>) in version requirement?
我正在开发的应用程序突然停止部署到 Heroku,出现错误:
remote: Gem::InstallError: execjs requires Ruby version >= 2.0.0.
remote: An error occurred while installing execjs (2.5.1), and Bundler cannot continue.
remote: Make sure that `gem install execjs -v '2.5.1'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
Ruby 2.0 对我来说不是一个可行的选择(我别无选择,只能在 MS Windows 上开发,而且太多 Ruby 2.0 的东西对 Windows 我上次看的时候),但我认为我不需要 execjs -v2.5.1。我没有在我的 gemfile 中明确调用它,如果我 运行 gem dependency execjs --reverse-dependencies
我得到:
Gem execjs-1.4.0
multi_json (~> 1.0)
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
sprockets-2.12.3 (execjs (~> 1.0, develo
sprockets-2.11.0 (execjs (~> 1.0, develo
sprockets-2.1.3 (execjs (~> 1.0, develop
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.2.1
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.2.2
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.3.0
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
Gem execjs-2.4.0
rake (>= 0, development)
Used by
coffee-script-2.3.0 (execjs (>= 0))
coffee-script-2.2.0 (execjs (>= 0))
uglifier-2.5.3 (execjs (>= 0.3.0))
uglifier-1.2.6 (execjs (>= 0.3.0))
看起来我不需要 v2.4.0 之后的任何东西(我没看错吗?)但是我如何告诉我的 gems 使用旧版本,而不是最新版本?
尝试在 Gemfile 中锁定您的 execjs 版本:
gem 'execjs', '2.4.0'
您可以像这样在 Gemfile 中指定 gem 版本:
gem "haml-rails", "~> 0.3.4"
或(特定版本)
gem "haml-rails", "0.3.4"
有关详细信息,请单击此处:
Meaning of tilde-greater-than (~>) in version requirement?