- 나는 두 가지 환경이 있습니다 : 과
development_with_production_data
입니다. 환경은 그들의
database.yml
항목에서 차이 : 나는[REDACTED]
이 값이 위의 올바른 값이 있다는 것을 확인했다레일 3은 mysql2 보석으로 원격 DB에 연결할 수 없습니다development: host: 127.0.0.1 adapter: mysql2 encoding: utf8 database: [REDACTED]_development username: root password: pool: 5 development_with_production_data: host: [REDACTED] port: [REDACTED] adapter: mysql2 encoding: utf8 database: [REDACTED]_production username: [REDACTED] password: [REDACTED] pool: 5
. 나는 동일한
[REDACTED]
값으로 연결하는 레일 2 응용 프로그램과 잘 연결될 수있는 GUI를 가지고 있습니다.development
환경에서로드 및 작동은 로컬에서 완벽하게 작동합니다.development_with_production_data
환경에서로드 및 작업해도 정적 인 캐시 된 페이지는 아닙니다. 오류 메시지 없음, 시간 초과 없음, 없음. 내가rails 3.0.7
을 사용하고 두mysql2 0.3.2
및mysql2 0.2.7
을 시도
coneybeare $ rails s -e development_with_production_data
NOTE: Gem::SourceIndex#all_gems is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::SourceIndex#all_gems called from /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.13/lib/bundler/rubygems_integration.rb:256
.
=> Booting WEBrick
=> Rails 3.0.7 application starting in development_with_production_data on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-05-09 01:23:48] INFO WEBrick 1.3.1
[2011-05-09 01:23:48] INFO ruby 1.8.7 (2009-06-12) [i686-darwin10]
[2011-05-09 01:23:48] INFO WEBrick::HTTPServer#start: pid=3854 port=3000
이 무엇 원인이 될 수 : 내가 보는 모든이 무엇입니까? 나는 마침내 RVM을 사용하여 내 Mac에서 1.9.2 내 루비를 업데이트하여이 문제를 해결 레일 3.0.7
감사합니다. 나는 (너무 언급해야 함) 시도했지만 동일한 문제가 발생했습니다. 보석 'mysql2', '<0.3'. 또한 로컬 호스트에 연결할 때 모두 잘 작동합니다. – coneybeare
오, 알겠습니다 .. 때때로 레일스는 알 수없는 WTF를 던집니다. :) – bor1s