Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqlモジュールのロードでエラーが発生 #34

Closed
mikoto20000 opened this issue Apr 24, 2012 · 1 comment
Closed

mysqlモジュールのロードでエラーが発生 #34

mikoto20000 opened this issue Apr 24, 2012 · 1 comment

Comments

@mikoto20000
Copy link
Member

次のようなエラーが出て、Redmine(mod_passenger経由)が起動しません><

A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
cannot load such file -- mysql (MissingSourceFile)

Exception class:
PhusionPassenger::UnknownError

Application root:
/opt/alminium

Backtrace:
#   File    Line    Location
0   /usr/lib64/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb 184 in `require'
1   /usr/lib64/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/dependencies.rb 184 in `require'
2   /usr/lib64/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/core_ext/kernel/requires.rb 7   in `block in require_library_or_gem'
3   /usr/lib64/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/core_ext/kernel/reporting.rb    11  in `silence_warnings'

mysqlのロードに失敗しているようだが、irbで読み込みを実行すると

# irb
irb(main):001:0> require 'mysql'
=> true

と表示され、モジュールの読み込み自体は成功しているように見えます。う~ん、なんだろ、、、

@mikoto20000
Copy link
Member Author

config/database.ymlを

production:
-  adapter: mysql
+ adapter: mysql2
  database: alminium
  host: localhost

と変更することにより、解決。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant