Forum: Ruby on Rails File_Column plugin causes strange errors on windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0a5d6fa912dda67f9b81017fbd9a81f2?d=identicon&s=25 Shane Sherman (Guest)
on 2006-03-26 22:41
(Received via mailing list)
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
009c581be96c1c9a2da7da4741c9580b?d=identicon&s=25 Anonymous (Guest)
on 2006-04-15 02:58
(Received via mailing list)
Having exactly the same problem here -- getting some very strange
errors, can't figure out how to fix it at all.
59ea1b450935b9d70abfec4186b7a4d5?d=identicon&s=25 Jeff Coleman (progressions)
on 2006-04-15 05:05
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 Coleman
This topic is locked and can not be replied to.