This project is archived and is in readonly mode.
undefined method `table_alias' - scaffold index action
Reported by agmcleod | January 13th, 2010 @ 01:36 AM
Installed Rails 3 pre today. As a test app, I went for creating a cookbook. After creating the application directories, I used the scaffold command to create a Recipe model, and a corresponding controller and the views. After creating the database and table, I launched my application through the script/server command. The default rails page came up fine, however going to http://localhost:3000/recipes I receive a NoMethodError.
undefined method table_alias' for
#<Arel::Table:0x60c57a0><br/> Rails.root:
C:/Users/Aaron/Documents/programming/rails/cookbook
Application Trace | Framework Trace | Full Trace
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-3.0.pre/lib/active_record/relation.rb:185:in
references_eager_loaded_tables?'<br/>
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-3.0.pre/lib/active_record/relation.rb:46:in
all'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-3.0.pre/lib/active_record/base.rb:651:in
send'<br/>
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-3.0.pre/lib/active_record/base.rb:651:in
find'
C:/Ruby/lib/ruby/gems/1.8/gems/activerecord-3.0.pre/lib/active_record/base.rb:674:in
all'<br/>
C:/Users/Aaron/Documents/programming/rails/cookbook/app/controllers/recipes_controller.rb:6:in
index'
C:1:in __send__'<br/> C:1:in
instrument'
Line 6 refers to:
@recipes = Recipe.all
Comments and changes to this ticket
-
agmcleod January 14th, 2010 @ 11:37 PM
I ran git submodule update, and reinstalled rails. Here's the output
Successfully built RubyGem
Name: arel Version: 0.2.pre File: arel-0.2.pre.gem Successfully installed arel-0.2.pre
1 gem installed
The system cannot find the path specified.
INSTALLING activesupport
Successfully installed activesupport-3.0.pre
1 gem installed
INSTALLING activemodelThe rest of the gems install without any errors. I do see the gem folder of arel in C:\Ruby\lib\ruby\gems\1.8\gems\arel-0.2.pre. The gemspec file is there as well. Note I am using Windows 7 RC x64
-
Matija Folnovic January 15th, 2010 @ 08:39 AM
I think this ticket can help you getting newest arel ( arel you have probably isn't newest )
https://rails.lighthouseapp.com/projects/8994/tickets/3633-undefine...
-
José Valim February 21st, 2010 @ 07:36 PM
- State changed from new to invalid
You need the newest ARel.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>