Forum: Ruby on Rails Filecolumn: url_for_file_column problem

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.
wborgon (Guest)
on 2005-12-04 14:02
(Received via mailing list)
Calling url_for_file_colum results in a TypeError: can't convert nil to
string.

 The error is in line 148 of filecolumn.rb:
     def relative_path(subdir=nil)
       File.join(relative_path_prefix,subdir, @filename)
     end

 If I substitute '' for subdir in the File.join command, then it seems
to work fine. Since this is a plugin, I'm wondering why I need to make
this modification.  Is there something wrong with my install or with the
plugin?
skanthak (Guest)
on 2005-12-04 14:55
(Received via mailing list)
Hi Wolfgang,

On 12/4/05, Wolfgang B. <removed_email_address@domain.invalid> wrote:
> modification.  Is there something wrong with my install or with the plugin?
well, even a plugin can have bugs... Even more so if I'm the author :)

Thanks for the bug report. I'm wondering which OS you are on as
File.join works on my system even if one of the arguments is nil.
Perhaps other platforms behave in a different way here? Having said
this, I just committed a work-around to the trunk that should fix this
problem.

BTW, it seems you are using the latest version from the trunk. While I
try to keep this as bug-free as possible it is not as stable as an
official releases. You can find them in the repository's "tags/"
directory.

Sebastian
wborgon (Guest)
on 2005-12-04 18:48
(Received via mailing list)
Sebastian,
 No problem, thanks for the clarification.  I'm using Fedora 4.
 -W

Sebastian K. <removed_email_address@domain.invalid> wrote: Hi Wolfgang,

On 12/4/05, Wolfgang B.  wrote:
> modification.  Is there something wrong with my install or with the plugin?
well, even a plugin can have bugs... Even more so if I'm the author :)

Thanks for the bug report. I'm wondering which OS you are on as
File.join works on my system even if one of the arguments is nil.
Perhaps other platforms behave in a different way here? Having said
this, I just committed a work-around to the trunk that should fix this
problem.

BTW, it seems you are using the latest version from the trunk. While I
try to keep this as bug-free as possible it is not as stable as an
official releases. You can find them in the repository's "tags/"
directory.

Sebastian
This topic is locked and can not be replied to.