0

웹 사이트를 만들고 있지만 실수로 버전 5 대신 Ruby on Rails 버전 4를 설치 했으므로 다음 위치로 업그레이드하고 싶습니다. 현재 시스템에있는 버전에서 누락 된 몇 가지 기능을 사용하려면 최신 버전을 사용하십시오. 나는이 가이드 다음 시도Ruby on Rails 4.2.7.1에서 5.0.1로 업그레이드 - 여전히 난간 사용 4.2.7.1

: 나는 rvm을 설치까지이 부분까지 순서대로 모든 사전 준비, 실행

http://railsapps.github.io/updating-rails.html

:

rvm use [email protected] --create 
gem install rails 
rails -v 

나는이 문제에 달렸다. rvm use [email protected] --create 출력 :

ruby-2.3.1 - #gemset created /home/dev/.rvm/gems/[email protected] 
ruby-2.3.1 - #generating rails5.0 wrappers.......... 
Using /home/dev/.rvm/gems/ruby-2.3.1 with gemset rails5.0 

파인. Gem install rails 또한 결정적 포함한 모든 36 보석 설치 오류없이 진행 : 내가 나중에 rails -v 직접 실행할 때,

Fetching: rails-5.0.1.gem (100%) 
Successfully installed rails-5.0.1 

및 그러나

Fetching: railties-5.0.1.gem (100%) 
Successfully installed railties-5.0.1 

를, 내가 얻을 :

Could not find proper version of railties (4.2.7.1) in any of the sources 
Run `bundle install` to install missing gems. 

때 I을 그러나 bundle install을 실행하면 시스템은 레일 4.2.7.1로 되돌아갑니다.

railties 4.2.7.1을 설치/연결하기 위해 추가 작업을 수행하고 시스템을 원래 레일 버전으로 되 돌리는 작업을 중단해야합니까? 레일을 많이 사용하지 않아서 구성에 익숙하지 않습니다. 아마도 내 응용 프로그램 내에서 구성 파일을 변경해야합니까?

+1

'Gemfile'에 무엇이 있습니까? – Iceman

+1

@ 아이즈 맨하하! 나는 그 문제를 발견했다고 생각한다! 감사... –

답변

3

문제는 이전 버전 번호가 포함 된 Gemfile에있었습니다. 나는 다음과 같은 업데이트 :

source 'https://rubygems.org' 


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '5.0.1' 
# Use mysql as the database for Active Record 
gem 'mysql2', '>= 0.3.13', '< 0.5' 
# Use SCSS for stylesheets 
gem 'sass-rails', '~> 5.0.6' 
# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 3.0.4' 
# Use CoffeeScript for .coffee assets and views 
gem 'coffee-rails', '~> 4.2.1' 
# See https://github.com/rails/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# Use jquery as the JavaScript library 
gem 'jquery-rails' 
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 2.4.1' 
# bundle exec rake doc:rails generates the API under doc/api. 
gem 'sdoc', '~> 0.4.1', group: :doc 

# Use ActiveModel has_secure_password 
gem 'bcrypt', '~> 3.1.7' 

# Use Unicorn as the app server 
# gem 'unicorn' 

# Use Capistrano for deployment 
gem 'capistrano-rails', group: :development 

group :development, :test do 
    # Call 'byebug' anywhere in the code to stop execution and get a debugger console 
    gem 'byebug' 
end 

group :development do 
    # Access an IRB console on exception pages or by using <%= console %> in views 
    gem 'web-console', '~> 2.0' 

    # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring 
    gem 'spring' 
end 

그런 다음 bundle install 다음 bundle update를 실행하고 지금은 레일 5.0.1있다. Gemfile을보고 제안 해 주신 Iceman에게 감사드립니다!