# Filecolumn: url\_for\_file\_column problem

**URL:** <https://www.ruby-forum.com/t/filecolumn-url-for-file-column-problem/51968>\
**Category:** Rails\
**Created:** [December 4, 2005, 1:02pm UTC](https://www.ruby-forum.com/t/filecolumn-url-for-file-column-problem/51968 "2005-12-04T13:02:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wborgon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ce7236/32.png) [@wborgon](https://www.ruby-forum.com/u/wborgon)\
**Post date:** [December 4, 2005, 1:02pm UTC](https://www.ruby-forum.com/t/filecolumn-url-for-file-column-problem/51968/1 "2005-12-04T13:02:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![wborgon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ce7236/32.png) [@wborgon](https://www.ruby-forum.com/u/wborgon)\
**Post date:** [December 4, 2005, 5:48pm UTC](https://www.ruby-forum.com/t/filecolumn-url-for-file-column-problem/51968/2 "2005-12-04T17:48:26Z")

</div>

Sebastian,  
No problem, thanks for the clarification. I’m using Fedora 4.  
-W

Sebastian K. [removed\_email\_address@domain.invalid](mailto: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

---

<div class="post-metadata">

**Author:** ![wborgon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/ce7236/32.png) [@wborgon](https://www.ruby-forum.com/u/wborgon)\
**Post date:** [December 4, 2005, 1:55pm UTC](https://www.ruby-forum.com/t/filecolumn-url-for-file-column-problem/51968/3 "2005-12-04T13:55:29Z")

</div>

Hi Wolfgang,

On 12/4/05, Wolfgang B. [removed\_email\_address@domain.invalid](mailto: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
