나는 기본적인 RoR 앱을 설정하고있다. 내 모든 데이터베이스는 MySQL과 로컬, 내 데이터베이스, yml 파일이 포함되어 있습니다. 기본보기에 액세스하려고하지만 여전히 ActiveRecord :: ConnectionNotEstablished 오류가 발생합니다. 내가 도대체 뭘 잘못하고있는 겁니까? 보석 파일루비 온 레일스 ActiveRecord :: ConnectionNotEstablished
# database.yml
development:
adapter: mysql2
encoding: utf8
database: *****_dev
username: ****
password: *****
host: 127.0.0.1
port: 3306
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
encoding: utf8
database: *****_test
username: ****
password: *****
host: 127.0.0.1
port: 3306
production:
adapter: mysql2
encoding: utf8
database: *****_prod
username: ****
password: *****
host: 127.0.0.1
port: 3306
MySQL2 :
gem 'mysql2', '~>0.3.10'
그래서 이동이 입력 할 때 http://localhost:3000/controller/view
를 내가 얻을 : 액티브 :: ConnectionNotEstablished
다른 내가 그 도움이 될 것입니다 포함 할 수 있습니다?
미리 감사드립니다.
당신은 로컬 호스트와 127.0.0.1를 교체하는 경우 그 일을합니까? 또한 Rails 버전은 무엇입니까? 3.2.6? – ScottJShea
127.0.0.1을 localhost로 바꾸면 rake db : migrate를 실행하려고하면 소켓 오류가 발생합니다. 127.0.0.1 rake db : migrate가 오류없이 실행됩니다. 또한, 난 레일에 3.2.2입니다. 감사. – analyticsPierce
당신은 아파치와 MySQL을 설치 했습니까? 결과는 http : // localhost / – chaitanya