rails 4.2 - 해당되는 글 1건

rails s -e production 명령시 아래와 같이 에러 발생..

.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)


원인은 mysql2 에서 0.4.X 버전의 문제인지 호환성 문제인지. 해당 버전은 문제가 있음.

현재까지의 결론은 0.3.X 버전을 사용하면 해결됨.

막연하게 설치된 mysql2 를 제거하려니.. 이렇게 다양한 버전이 설치되어 있었음..

mysql2-0.3.20 을 제외한 다른 버전은 먼저..제거.

Gemfile 에 다음과 같이 설정.

  =>  gem 'mysql2', '~> 0.3.20'

문제 해결!!!

      개발관련/RubyOnRails  |  2015. 10. 2. 11:43



blesscdh's Blog is powered by Daum & Tattertools