function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JohnBarnesJohnBarnes 

Ruby on Rails - Activesalesforce help needed - development database is not configured...

I'm new to ROR and went through the O'Reily tutorial that used mySQL and was impressed how easy it was to build an App using it around managine recipes.

However when I tried to do anything with ROR and Salesforce I can't get anywhere.  Could someone help me understand what I'm doing wrong here?  I'm on Ruby version 1.8.2, and Rails version 1.1.0,  activesalesforce-0.4.8

Here is what I have done:


  • I installed the activesalesforce gem and see it when I run "gem list --local"
  • I created a new app "rails sfdc"
  • I edited the environments.rb file and added "require_gem 'activesalesforce'"
  • I edited the database.yml file and it now contains (I have tried several variations):

salesforce:
    adapter: activesalesforce
    url: https://www.salesforce.com/services/Soap/u/7.0
    username: xxx
    password: xxx

development:
    datbase: salesforce
    adapter: activesalesforce
    url: https://www.salesforce.com/services/Soap/u/7.0
    username: xxx
    password: xxx

test:
    adapter: activesalesforce
    url: https://www.salesforce.com/services/Soap/u/7.0
    username: xxx
    password: xxx
production:
    adapter: activesalesforce
    url: https://www.salesforce.com/services/Soap/u/7.0
    username: xxx

When I try to generate a model or controller I always get this message:

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_
adapters/abstract/connection_specification.rb:194:in `establish_connection': dev
elopment database is not configured (ActiveRecord::AdapterNotSpecified)
        from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_recor
d/connection_adapters/abstract/connection_specification.rb:185:in `establish_con
nection'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:182:i
n `initialize_database'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:84:in
 `process'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:42:in
 `send'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:42:in
 `run'
        from ./script/../config/../config/environment.rb:11
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire__'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_suppo
rt/dependencies.rb:136:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/commands/generate.rb
:1
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire__'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `re
quire'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.0/lib/active_suppo
rt/dependencies.rb:136:in `require'
        from script/generate:3

Any ideas?


Tran ManTran Man
I used instant rails and was up and running in no time. The only thing I changed in the database.yml was this:
development:
  adapter: activesalesforce
  url: https://www.salesforce.com/services/Soap/u/7.0
  username: myaccount@yahoo.com
  password: xxx
Also, you might want to run ruby with debug and see if that helps. HTH

Message Edited by Tran Man on 03-31-2006 11:14 AM

dchasmandchasman
John, Are you still experiencing this issue? The Connection Adapter Not Specified error is happening before anything that belongs to ActiveSalesforce is involved.

We have found (a number of internal customers have run into similar issues) that Ruby and YAML seem to be very picky about extra whitespace - seemed to be more of an issue in ruby 1.8.2, rubby 1.8.3 was a quality disaster (well known). Ruby 1.8.4 is quite stable and is our primary dev/test environment (on Suse Linux 10.0 and WinXP).

Message Edited by dchasman on 04-27-2006 07:20 AM