Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Undefined method `adapter_name' on GET request

#3732

I'm seeing the following in the development logs when I perform a GET request:

Processing "/posts" to */* (for 127.0.0.1 at 2010-01-17 18:12:05) [GET]

NoMethodError (undefined method `adapter_name' for {:engine=>#<Arel::Sql::Engine:0x1b33188 @ar=ActiveRecord::Base>}:Hash):
  app/controllers/posts_controller.rb:5:in `index'

In order to generate the my project, I performed the following steps:

$ rails blog-3.0.0
$ cd blog-3.0.0
$ script/generate scaffold post title:string blog:text
$ rake db:migrate
$ script/server

Now, navigate to the URL, http:://localhost:3000/posts, and one should be able to see the above message in the 'development.log' file.

I have the following configuration:

OS:  Mac OS 10.5.8 (PPC)
ruby 1.9.2dev (2010-01-18 trunk 26340) [powerpc-darwin9.8.0]

Lastly, my Gemfile contains the following:

gem "rails", "3.0.pre"

## Bundle edge rails:
# gem "rails", :git => "git://github.com/rails/rails.git"

## Bundle the gems you use:
gem "sqlite3-ruby", :require_as => "sqlite3"

Reported by Conrad Taylor · January 18th, 2010 @ 02:30 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Rizwan Reza
    Rizwan Reza

    You'll need to follow the instructions posted here: http://weblog.rubyonrails.org/2010/1/1/getting-a-new-app-running-on....

    If you find that there is error afterwards, please reply by saying so. Thanks.

    January 18th, 2010 @ 02:36 AM

  2. Conrad Taylor
    Conrad Taylor

    Rizwan, I seeing the same error in the logs after following steps as indicated here:

    http://weblog.rubyonrails.org/2010/1/1/getting-a-new-app-running-on...

    January 18th, 2010 @ 02:54 AM

  3. mgutz
    mgutz

    Looks to be an issue with arel dependency. Adding this line to Gemfile in generated app root worked for me.

      gem 'arel', :git => 'git://github.com/rails/arel.git'
    

    January 19th, 2010 @ 03:56 AM

  4. Conrad Taylor
    Conrad Taylor
    • Tag changed from rails3, ruby1.9.2 to bundler, rails3, ruby1.9.2

    Yes, there's an issue with the dependency mechanism because the first line of the Gemfile bundles the arel gem with the application. Also, I confirmed that your solution does work within my environment.

    January 19th, 2010 @ 04:40 AM

  5. Pablo Formoso Estrada
    Pablo Formoso Estrada

    I'm having the same issue. I try to solve it adding the arel gem to the Gemfile and thats not work for me.
    http://localhost:3000/posts/new load correctly but when submiting form this error is shown:

    undefined method columns' for #<Hash:0x00000103243f98><br/> app/controllers/posts_controller.rb:47:inblock in create'
    app/controllers/posts_controller.rb:46:in create'

    It seems not to get the sqlite3 engine...

    I've installed ruby-1.9.1p378 with RVM on MacOS 10.6 & my list of gems http://pastie.org/785148

    Any ideas?

    January 19th, 2010 @ 06:15 PM

  6. Rizwan Reza
    Rizwan Reza
    • Title changed from [RAILS][3.0pre] undefined method `adapter_name' on GET request to Undefined method `adapter_name' on GET request

    January 20th, 2010 @ 10:28 AM

  7. Rizwan Reza
    Rizwan Reza
    • State changed from new to open

    Pablo: please make sure you're using the latest Ruby 1.9.1 release.

    January 20th, 2010 @ 10:38 AM

  8. Rizwan Reza
    Rizwan Reza
    • State changed from open to invalid

    January 24th, 2010 @ 09:57 PM