大家好,我在 gemfile 添加 gem‘fasercsv’后执行 bundle install,显示已经安装成功了
xxx@xxxxx:/opt/redmine-4.1.1-0/apps/redmine/htdocs$ bundle config unset deployment
xxx@xxxx:/opt/redmine-4.1.1-0/apps/redmine/htdocs$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
.......
Using csv 3.1.2
Fetching fastercsv 1.5.5
Installing fastercsv 1.5.5
Using htmlentities 4.3.4
........
在 htdocs/vendor/bundle 中也有了这个包
但是 gem list 查看却查看不到
xxx@xxxxxx:/opt/redmine-4.1.1-0/apps/redmine/htdocs$ gem list
*** LOCAL GEMS ***
......
capybara (3.25.0)
childprocess (3.0.0)
cmath (default: 1.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.6)
crass (1.0.6)
css_parser (1.7.1)
csv (3.1.2, default: 3.0.9)
date (default: 2.0.0)
dbm (default: 1.0.0)
debase (0.2.4.1)
debase-ruby_core_source (0.10.11)
did_you_mean (1.3.0)
docile (1.3.2)
e2mmap (default: 0.1.0)
erubi (1.9.0)
etc (default: 1.0.1)
executable-hooks (1.6.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.1.0)
forwardable (default: 1.2.0)
gdbm (default: 2.0.0)
gem-wrappers (1.4.0)
globalid (0.4.2)
htmlentities (4.3.4)
i18n (1.8.2, 1.6.0)
io-console (default: 0.4.7)
......
访问后,apache2/logs/error.log 报错
App 29373 output: Unknown ruby interpreter version (do not know how to handle): >=2.3.0,<2.7.0ifBundler::VERSION>=1.12.0.
App 29373 output: Error: The application encountered the following error: Could not find fastercsv-1.5.5 in any of the sources (Bundler::GemNotFound)
App 29373 output: /opt/redmine-4.1.1-0/ruby/lib/ruby/gems/2.5.0/gems/bundler-2.1.2/lib/bundler/spec_set.rb:86:in `block in materialize'
App 29373 output: /opt/redmine-4.1.1-0/ruby/lib/ruby/gems/2.5.0/gems/bundler-2.1.2/lib/bundler/spec_set.rb:80:in `map!'
App 29373 output: /opt/redmine-4.1.1-0/ruby/lib/ruby/gems/2.5.0/gems/bundler-2.1.2/lib/bundler/spec_set.rb:80:in `materialize'
我的环境是集成环境,passenger:
ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
rails: Rails 5.2.4.2
接触 rails 时间不长,stackoverflow 上的答案都试过了,网上查找了一天也没找到好的解决方案。请问各位这是什么原因,我该怎么处理?