Добрый день!
Подскажите, как сменить версию rails c уже установленной 4,2 на 5,2 (5,2 только что установил).
вот что пишет при запросе команды: rails -v
Beginning in Rails 4, Rails ships with a rails binstub at ./bin/rails that
should be used instead of the Bundler-generated rails binstub.
If you are seeing this message, your binstub at ./bin/rails was generated by
Bundler instead of Rails.
You might need to regenerate your rails binstub locally and add it to source
control:
rails app:update:bin # Bear in mind this generates other binstubs
too that you may or may not want (like yarn)
If you already have Rails binstubs in source control, you might be
inadverently overwriting them during deployment by using bundle install
with the --binstubs option.
If your application was created prior to Rails 4, here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator
rails app:update:bin # Use the new Rails executables
git add bin # Add bin/ to source control
You may need to remove bin/ from your .gitignore as well.
When you install a gem whose executable you want to use in your app,
generate it and add it to source control:
WARN: Unresolved specs during Gem::Specification.reset:
minitest (~> 5.1)
rake (>= 0.8.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runti
me.rb:34:in block in setup': You have already activated activesupport 5.2.2, bu t your Gemfile requires activesupport 4.2.8. Prependingbundle execto your co mmand may solve this. (Gem::LoadError) from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/ bundler/runtime.rb:19:insetup'
from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/
bundler.rb:122:in setup' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/ bundler/setup.rb:8:in<top (required)>'
from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:133:in require' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:133:inrescue in require'
from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:40:in require' from C:/Bitnami/redmine/apps/redmine/htdocs/config/boot.rb:6:in<top (r
equired)>'
from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:120:in require' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:120:inrequire'
from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib
/rails/app_loader.rb:58:in block in exec_app' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/app_loader.rb:48:inloop'
from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib
/rails/app_loader.rb:48:in exec_app' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/cli.rb:7:in<top (required)>'
from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:68:in require' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:68:inrequire'
from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/exe
/rails:10:in <top (required)>' from C:/Bitnami/redmine/ruby/bin/rails:23:inload'
from C:/Bitnami/redmine/ruby/bin/rails:23:in `'
Прежде всего после смены версии Rails в Gemfile необходимо сделать bundle install;
А так как в версии 5 по сравнению с 4-ой много изменений, то потребуется доработка кода.
Добрый день! Подскажите, как сменить версию rails c уже установленной 4,2 на 5,2 (5,2 только что установил). вот что пишет при запросе команды: rails -v
Beginning in Rails 4, Rails ships with a
rails
binstub at ./bin/rails that should be used instead of the Bundler-generatedrails
binstub.If you are seeing this message, your binstub at ./bin/rails was generated by Bundler instead of Rails.
You might need to regenerate your
rails
binstub locally and add it to source control:rails app:update:bin # Bear in mind this generates other binstubs
too that you may or may not want (like yarn)
If you already have Rails binstubs in source control, you might be inadverently overwriting them during deployment by using bundle install with the --binstubs option.
If your application was created prior to Rails 4, here's how to upgrade:
bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control
You may need to remove bin/ from your .gitignore as well.
When you install a gem whose executable you want to use in your app, generate it and add it to source control:
bundle binstubs some-gem-name git add bin/new-executable
WARN: Unresolved specs during Gem::Specification.reset: minitest (~> 5.1) rake (>= 0.8.7) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/bundler/runti me.rb:34:in'
block in setup': You have already activated activesupport 5.2.2, bu t your Gemfile requires activesupport 4.2.8. Prepending
bundle execto your co mmand may solve this. (Gem::LoadError) from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/ bundler/runtime.rb:19:in
setup' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/ bundler.rb:122:insetup' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/bundler-1.9.6/lib/ bundler/setup.rb:8:in
<top (required)>' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:133:inrequire' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:133:in
rescue in require' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:40:inrequire' from C:/Bitnami/redmine/apps/redmine/htdocs/config/boot.rb:6:in
<top (r equired)>' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:120:inrequire' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:120:in
require' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/app_loader.rb:58:inblock in exec_app' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/app_loader.rb:48:in
loop' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/app_loader.rb:48:inexec_app' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/lib /rails/cli.rb:7:in
<top (required)>' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:68:inrequire' from C:/Bitnami/redmine/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/ kernel_require.rb:68:in
require' from C:/Bitnami/redmine/ruby/lib/ruby/gems/2.3.0/gems/railties-5.2.2/exe /rails:10:in<top (required)>' from C:/Bitnami/redmine/ruby/bin/rails:23:in
load' from C:/Bitnami/redmine/ruby/bin/rails:23:in `