madams
June 17, 2008, 10:50pm
1
I’m trying to follow the instructions at
http://wiki.radiantcms.org/Installing_Extension_-_Page_Attachments . When
I get to this step:
rake production db:migrate:extensions
The output is:
rake aborted!
undefined method `[]’ for #Enumerable::Enumerator:0x24c267c
From that point on, my server will no longer start up as well.
This is on Leopard, with
ruby 1.8.7 (2008-06-09 patchlevel 17) [i686-darwin9.3.0]
rails 2.1.0
Any suggestions would be appreciated!
madams
June 18, 2008, 10:11pm
2
Matt Anderson wrote:
Any suggestions would be appreciated!
I just successfully installed Page Attachments on version 0.6.7.
I followed the guide (although much of it is outdated and no longer
necessary).
All you have to do is:
Install attachment_fu:
$ svn export
http://svn.techno-weenie.net/projects/plugins/attachment_fu/
vendor/plugins/attachment_fu
Download the page_attachments extension into the proper directory
$ cd /path/to/my/radiant/project
$ svn checkout
http://svn.radiantcms.org/radiant/trunk/extensions/page_attachments
vendor/extensions/page_attachments
Now run the extension migrations:
$ rake production db:migrate:extensions
Run the ‘update’ task to copy the appropriate assets from the
page_attachments extension:
$ rake production radiant:extensions:page_attachments:update
Restart your application and/or web server.
With Phusion Passenger:
$ cd tmp
$ touch restart.txt
madams
June 18, 2008, 11:36pm
3
I think your problem might be with ruby 1.8.7, there were some changes
to Enumerable::Enumerator that are possibly incompatible. Can you try
going back to 1.8.6 and see if you get the same error?
madams
June 18, 2008, 11:14pm
4
Ben M. wrote:
Now run the extension migrations:
$ rake production db:migrate:extensions
Same result: after trying that command, the output was
rake aborted!
undefined method `[]’ for #Enumerable::Enumerator:0x26cbef0
madams
June 19, 2008, 1:27am
5
Why should the user need to downgrade? 1.8.7 is the current stable
version of Ruby.
It is Radiant that needs to update. Or, if the devs can’t be bothered
doing that, at least post a notice on their website saying so.
madams
June 19, 2008, 2:01am
6
john muhl wrote:
I think your problem might be with ruby 1.8.7
Reverting to 1.8.6 seems to have fixed it, guess I got ahead of Radiant
a bit…thanks!
madams
June 19, 2008, 8:20am
8
This mailer extension once worked I think. It still sends email but
now the attachment part doesn’t work. Am I crazy or missing
something? Okay I got the note in the todo list but hey this worked
just a couple of months ago. Does it work for other people?
Steven
madams
June 19, 2008, 3:29am
9
We will heartily accept patches that resolve this issue while
maintaining compatibility with 1.8.6 and earlier.
Sean
madams
July 9, 2008, 11:52am
10
Just for reference. I solved this with the patch provided in
http://www.mail-archive.com/[email protected] /msg528878.html .
Just add:
---- 8< ----
unless ‘1.9’.respond_to?(:force_encoding)
String.class_eval do
begin
remove_method :chars
rescue NameError
# OK
end
end
end
---- 8< ----
To your environment.rb (adding it to config/initializers/ as
suggested in
the URL above won’t work in Radiant).
/AITOR