Version
- ruby 1.9.2-p290
- rails 3.0.9
- mysql2-0.2.13 under rvm
- ubuntu 11.04
gem is installed with "gem install mysql2 -v '<0.3'". All dependencies were fulfilled.
rails and c rails are working fine.
I need to run a script outside the rails environment using activerecord 3.0.9. When I run the script, this is the output:
========================
/home/ross/work/x/library/models.rb:27:in `eval': !!! Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2' (RuntimeError) from /home/ross/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.9/lib/active_record/connection_adapters/mysql_adapter.rb:19:in `mysql_connection' from /home/ross/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `new_connection' ....
=========================
It’s clear that there is stone, because the rails work.
I don’t know why the stone was not found when running the script?
Can anyone shed some light on the problem?
Relations Ross
source share