I recently updated to Ruby 2.5.3 and Rails 5.2.1. Here si the Gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 5.2'
gem 'bootstrap-sass'
gem 'sassc-rails'
gem 'coffee-rails', '~> 4.2'
gem 'uglifier', '~> 3.0'
gem 'bcrypt', '~> 3.1'
gem 'jquery-rails', '~> 4.1'
gem 'turbolinks', '~> 5.0'
gem 'jbuilder', '~> 2.6'
gem 'bootstrap-datepicker-rails', '~> 1.6'
gem 'will_paginate', '~> 3.1'
gem 'd3-rails'
gem 'httparty', '~> 0.14'
gem 'nested_form_fields'
gem 'pg'
# XLSX format support
gem 'iconv'
gem 'write_xlsx'
gem 'roo'
# Authorisations
gem 'devise'
gem 'cancancan', '~> 2.0'
# MarkDown parser
gem 'redcarpet'
# eMail notification support
gem 'mailgun-ruby', '~>1.1'
# gem for dev and test only
group :development, :test, :eval do
gem 'annotate', '~> 2.7'
gem 'shoulda-matchers', '4.0.0.rc1'
gem 'rails-controller-testing'
gem 'rspec-rails', '~> 3.5'
gem 'factory_bot_rails'
gem 'capybara', '~> 2.7'
gem 'selenium-webdriver', '~> 2.53'
end
group :development do
gem 'web-console', '~>3.1'
gem 'listen', '~>3.0'
gem 'spring', '~>1.7'
gem 'spring-watcher-listen', '2.0'
end
As far as I know, i18n is included in Rails 5, but 1.1.1 version seems to be missing. I run the bundler update, tried to remove Gemfile.lock, install gem i18n directly:
/var/www/dqm$ gem install gem install i18n
ERROR: Could not find a valid gem 'gem' (>= 0) in any repository
ERROR: Possible alternatives: gem
ERROR: Could not find a valid gem 'install' (>= 0) in any repository
ERROR: Possible alternatives: installr, go-install, insta, instacli, instana
Successfully installed i18n-1.1.1
but still the issue is raised with Passenger.
(Starting the application on WEBrick works with no issue.)
But Passenger returns following error:
Could not find i18n-1.1.1 in any of the sources (Bundler::GemNotFound)
with the following trace:
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/spec_set.rb:91:in `block in materialize'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/spec_set.rb:85:in `map!'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/spec_set.rb:85:in `materialize'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/definition.rb:171:in `specs'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/definition.rb:238:in `specs_for'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/definition.rb:227:in `requested_specs'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:108:in `block in definition_method'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/runtime.rb:20:in `setup'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler.rb:107:in `setup'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/lib/bundler/setup.rb:20:in `<top (required)>'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/home/fred/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:91:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
How can I solve this ? Any idea is welcome... Thanks!
Actually, in my service configuration file, I also need to set the consistent version for Ruby: 2.5.3. My virtual host declaration should contain the following:
<VirtualHost *:80>
ServerName dqm.---.com
RailsEnv development
# Tell Apache and Passenger where your app's 'public' directory is
DocumentRoot /var/www/dqm/public
PassengerRuby /home/fred/.rbenv/versions/2.5.3/bin/ruby
---
This solved my issue!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.