I just performed a couple of migrations - one adding database columns:
def self.up
add_column :properties_sfar_commercial, :auctions_desc, :string
add_column :properties_sfar_commercial, :bank_owned_desc, :string
add_column :properties_sfar_commercial, :short_sales_desc, :string
add_column :properties_sfar_commercial, :trades_desc, :string
add_column :properties_sfar_commercial, :listing_price, :string
add_column :properties_sfar_commercial, :selling_price, :string
add_column :properties_sfar_commercial, :selling_date, :string
add_column :properties_sfar_commercial, :selling_agent_id, :string
add_column :properties_sfar_commercial, :selling_agent_name,
:string
add_column :properties_sfar_commercial, :selling_co_agent_id,
:string
add_column :properties_sfar_commercial, :selling_co_agent_name,
:string
add_column :properties_sfar_commercial, :selling_office_id, :string
add_column :properties_sfar_commercial, :selling_office_name,
:string
add_column :properties_sfar_commercial, :selling_co_office_id,
:string
add_column :properties_sfar_commercial, :selling_co_office_name,
:string
end
one removing:
def self.up
remove_column :properties_sfar_commercial, :area_display
remove_column :properties_sfar_commercial, :search_price
remove_column :properties_sfar_commercial, :co_office_phone
remove_column :properties_sfar_commercial, :garage_spaces
remove_column :properties_sfar_commercial, :virtual_tour_url
remove_column :properties_sfar_commercial, :contact_phone_1
remove_column :properties_sfar_commercial, :co_agent_phone_1
remove_column :properties_sfar_commercial, :price_change
end
And now that all columns are as they should be (I think?) I get this
error on rake:
** Invoke idx:load_properties (first_time)
** Execute idx:load_properties
** Execute idx:update_db
rake aborted!
no implicit conversion from nil to integer
/var/www/apps/quickidx/releases/20080519171438/lib/idx/sfar_commercial.rb:16:in
[]' /var/www/apps/quickidx/releases/20080519171438/lib/idx/sfar_commercial.rb:16:in
map_property’
/var/www/apps/quickidx/releases/20080519171438/lib/tasks/idx.rake:84
/var/www/apps/quickidx/releases/20080519171438/lib/quickidx.rb:142:in
parse' /var/www/apps/quickidx/releases/20080519171438/lib/quickidx.rb:136:in
parse’
/var/www/apps/quickidx/releases/20080519171438/lib/tasks/idx.rake:52
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:544:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in
execute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
invoke_with_call_chain' /usr/lib/ruby/1.8/thread.rb:135:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:518:in
invoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1183:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:515:in
invoke_prerequisites’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:507:in
invoke_with_call_chain' /usr/lib/ruby/1.8/thread.rb:135:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in
invoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in
run’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in
run’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
/usr/bin/rake:16
I’m new at Ruby on Rails but know that we are running 2.0.2 and this
would be the first time we have ever seen this error.
Anyone able to diagnose? Thanks much