File_Column plugin causes strange errors on windows


#1

I installed the File_Column plugin and setup my relationships.

create_table “screenshots”, :force => true do |t|
t.column “image”, :string, :limit => 255, :null => false
t.column “description”, :text
t.column “created_on”, :datetime, :null => false
t.column “item_id”, :integer, :null => false
t.column “confirmed_by”, :integer
t.column “created_on”, :datetime, :null => false
t.column “created_by”, :integer, :null => false
end

class Item < ActiveRecord::Base
has_many :screenshots
end

class Screenshot < ActiveRecord::Base
file_column :image, :magick => { :geometry => “640x480>” }
belongs_to :item
end

After doing this all my pages instantly fail with strange errors like :
./script/…/config/…/app/views/home/index.rhtml:2: parse error,
unexpected
$, expecting kEND

If I remove the “has_many :screenshots” relationship everything works
fine.
I’ve installed rmagick, and everything is setup correctly. I’ve
researched
this a bit and others have had this same type problem, and it seems to
be
some kind of encoding issue. Any ideas? It seems like a File_Column bug.

  • Shane

#2

Having exactly the same problem here – getting some very strange
errors, can’t figure out how to fix it at all.


#3

Anonymous wrote:

Having exactly the same problem here – getting some very strange
errors, can’t figure out how to fix it at all.

Are you running Ruby 1.8.4? I experienced this problem with
file_column, RMagick and Ruby 1.8.4. I switched back to Ruby 1.8.2 and
the problems stopped.

One of the symptoms was that any TAB characters in my views would cause
errors.

Jeff C.man