Missing the mysql2 gem. Add it to your Gemfile: gem 'mysql2'

  • Thread starter Jakub FlaÅ¡ka
  • Start date
J

Jakub Flaška

Hello I have this small script:

----------------------
require 'active_record'

ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:database => 'cards',
:username => 'user',
:password => 'myPassword',
:host => 'localhost',
:charset => 'utf8',
:encoding => 'utf8',
:port => '3306')

class Start < ActiveRecord::Base
set_table_name "grb_tGStart"
set_primary_key "start_id"
has_many :posts
end

starts = Start.find:)all, :conditions => [ "agency_id = (?) AND
is_active = (?)", 17, 1 ])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top