You need to drop 'rails' from your Gemfile and replace it with its components, 
minus activerecord:
>      actionmailer (= 3.0.7)
>      actionpack (= 3.0.7)
You may or may not want activeresource:
>      activeresource (= 3.0.7)
>      activesupport (= 3.0.7)
>      bundler (~> 1.0)
>      railties (= 3.0.7)

See https://github.com/datamapper/dm-rails for more info.

HTH,
Emmanuel

On May 6, 2011, at 12:48 AM, Chris Corbyn wrote:

> Ok, I can't find what I'm looking for in the dm-rails README file.  
> Unfortunately I had already started the project and don't really want to just 
> start over, so I need to somehow configure what "came out of the box" when I 
> did "rails new myproject".  If I remove "mysql" from the Gemfile, I get an 
> error from ActiveRecord when Rails starts.
> 
> Do I need to take something out of my Gemfile to obliterate ActiveRecord?
> 
> Here's my database.yml (it looks just like the one in that README)
> 
> defaults: &defaults
>  adapter: mysql
>  encoding: utf8
>  username: flippa
>  password: something
>  host: localhost
> 
> development:
>  <<: *defaults
>  database: flippa
> 
> test:
>  <<: *defaults
>  database: flippatest
> 
> production:
>  <<: *defaults
>  database: flippa
> 
> And my Gemfile:
> 
> source 'http://rubygems.org'
> 
> gem 'rails', '3.0.7'
> gem 'rack-ssl-enforcer'
> gem 'mysql'
> gem 'dm-rails', '1.1'
> gem 'dm-types'
> gem 'dm-mysql-adapter'
> gem 'capistrano'
> gem 'unicorn'
> gem 'aws-s3', :require => 'aws/s3'
> gem 'memcache-client'
> 
> 
> And here's my Gemfile.lock
> 
> GEM
>  remote: http://rubygems.org/
>  specs:
>    abstract (1.0.0)
>    actionmailer (3.0.7)
>      actionpack (= 3.0.7)
>      mail (~> 2.2.15)
>    actionpack (3.0.7)
>      activemodel (= 3.0.7)
>      activesupport (= 3.0.7)
>      builder (~> 2.1.2)
>      erubis (~> 2.6.6)
>      i18n (~> 0.5.0)
>      rack (~> 1.2.1)
>      rack-mount (~> 0.6.14)
>      rack-test (~> 0.5.7)
>      tzinfo (~> 0.3.23)
>    activemodel (3.0.7)
>      activesupport (= 3.0.7)
>      builder (~> 2.1.2)
>      i18n (~> 0.5.0)
>    activerecord (3.0.7)
>      activemodel (= 3.0.7)
>      activesupport (= 3.0.7)
>      arel (~> 2.0.2)
>      tzinfo (~> 0.3.23)
>    activeresource (3.0.7)
>      activemodel (= 3.0.7)
>      activesupport (= 3.0.7)
>    activesupport (3.0.7)
>    addressable (2.2.5)
>    arel (2.0.9)
>    aws-s3 (0.6.2)
>      builder
>      mime-types
>      xml-simple
>    bcrypt-ruby (2.1.4)
>    builder (2.1.2)
>    capistrano (2.5.21)
>      highline
>      net-scp (>= 1.0.0)
>      net-sftp (>= 2.0.0)
>      net-ssh (>= 2.0.14)
>      net-ssh-gateway (>= 1.0.0)
>    data_objects (0.10.5)
>      addressable (~> 2.1)
>    dm-active_model (1.1.0)
>      activemodel (~> 3.0.4)
>      dm-core (~> 1.1.0)
>    dm-core (1.1.0)
>      addressable (~> 2.2.4)
>    dm-do-adapter (1.1.0)
>      data_objects (~> 0.10.2)
>      dm-core (~> 1.1.0)
>    dm-mysql-adapter (1.1.0)
>      dm-do-adapter (~> 1.1.0)
>      do_mysql (~> 0.10.2)
>    dm-rails (1.1.0)
>      actionpack (~> 3.0.4)
>      dm-active_model (~> 1.1.0)
>      dm-core (~> 1.1.0)
>      railties (~> 3.0.4)
>    dm-types (1.1.0)
>      bcrypt-ruby (~> 2.1.4)
>      dm-core (~> 1.1.0)
>      fastercsv (~> 1.5.4)
>      json (~> 1.4.6)
>      stringex (~> 1.2.0)
>      uuidtools (~> 2.1.2)
>    do_mysql (0.10.5)
>      data_objects (= 0.10.5)
>    erubis (2.6.6)
>      abstract (>= 1.0.0)
>    fastercsv (1.5.4)
>    highline (1.6.1)
>    i18n (0.5.0)
>    json (1.4.6)
>    kgio (2.3.3)
>    mail (2.2.19)
>      activesupport (>= 2.3.6)
>      i18n (>= 0.4.0)
>      mime-types (~> 1.16)
>      treetop (~> 1.4.8)
>    memcache-client (1.8.5)
>    mime-types (1.16)
>    mysql (2.8.1)
>    net-scp (1.0.4)
>      net-ssh (>= 1.99.1)
>    net-sftp (2.0.5)
>      net-ssh (>= 2.0.9)
>    net-ssh (2.1.4)
>    net-ssh-gateway (1.0.1)
>      net-ssh (>= 1.99.1)
>    polyglot (0.3.1)
>    rack (1.2.2)
>    rack-mount (0.6.14)
>      rack (>= 1.0.0)
>    rack-ssl-enforcer (0.2.2)
>    rack-test (0.5.7)
>      rack (>= 1.0)
>    rails (3.0.7)
>      actionmailer (= 3.0.7)
>      actionpack (= 3.0.7)
>      activerecord (= 3.0.7)
>      activeresource (= 3.0.7)
>      activesupport (= 3.0.7)
>      bundler (~> 1.0)
>      railties (= 3.0.7)
>    railties (3.0.7)
>      actionpack (= 3.0.7)
>      activesupport (= 3.0.7)
>      rake (>= 0.8.7)
>      thor (~> 0.14.4)
>    rake (0.8.7)
>    stringex (1.2.1)
>    thor (0.14.6)
>    treetop (1.4.9)
>      polyglot (>= 0.3.1)
>    tzinfo (0.3.27)
>    unicorn (3.6.1)
>      kgio (~> 2.3)
>      rack
>    uuidtools (2.1.2)
>    xml-simple (1.0.15)
> 
> PLATFORMS
>  ruby
> 
> DEPENDENCIES
>  aws-s3
>  capistrano
>  dm-mysql-adapter
>  dm-rails (= 1.1)
>  dm-types
>  memcache-client
>  mysql
>  rack-ssl-enforcer
>  rails (= 3.0.7)
>  unicorn
> 
> 
> El 06/05/2011, a las 16:42, Dan Kubb (dkubb) escribió:
> 
>> Chris,
>> 
>>> Thanks, it's really weird, because UTF8 is what MySQL uses in table 
>>> definitions etc:
>> 
>> In general we would use Ruby's own conventions as authoritative not
>> any one specific database.
>> 
>>> Changing to utf-8, or UTF-8 (with or without quotes) produces a crash in 
>>> ActiveRecord instead of a warning from DO:
>> 
>> Are you using the same database.yml for DataMapper as for
>> ActiveRecord? If so, I would probably recommend against that.. there
>> are likely to be differences here and there, and we don't make any
>> strong claims to provide backwards compatible support for ActiveRecord
>> syntax. (i.e. we try to use similar names when it is the best name
>> possible, but if they're using something for legacy reasons or there's
>> a better name then we don't hesitate to break compatibility)
>> 
>>> Using UTF8 (without the hypen, in uppercase) produces the warning, but 
>>> Rails starts successfully.
>> 
>> Oh, so you haven't disabled ActiveRecord? I'm trying to understand how
>> your app is setup and why you would be getting this error.
>> 
>>> With regards to DataObjects vs. DataMapper, excuse my ignorance, but are 
>>> they not all part of the same group of projects?  They all come under the 
>>> data-mapper github account and seem to have the same contributors.
>> 
>> They started life together, but they are distinct projects and can be
>> used independently of each other.
>> 
>> --
>> 
>> Dan
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "DataMapper" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/datamapper?hl=en.
>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/datamapper?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to