script/extenstion install broken ?

1 view
Skip to first unread message

Peter Berkenbosch

unread,
Sep 25, 2008, 4:08:49 PM9/25/08
to radiant...@googlegroups.com
Trying to install a extension... but this is the output...

script/extension install paperclipped
/Users/peterberkenbosch/dev/erikdenoorman.eu/vendor/radiant/vendor/rails/activeresource/lib/../../activesupport/lib/active_support/core_ext/string/access.rb:53:in `last': undefined method `[]' for #<Enumerable::Enumerator:0x53717c> (NoMethodError)
from /Users/peterberkenbosch/dev/erikdenoorman.eu/vendor/radiant/lib/radiant/extension/script.rb:235:in `find_extension'
from /Users/peterberkenbosch/dev/erikdenoorman.eu/vendor/radiant/lib/radiant/extension/script.rb:235:in `find_extension'
from /Users/peterberkenbosch/dev/erikdenoorman.eu/vendor/radiant/lib/radiant/extension/script.rb:248:in `initialize'
from script/extension:5

When I take a look to the find_extension method:
def find_extension
          self.extension = load_extensions.find{|e| e.name == self.extension_name }
        end

Anyone ?


--
met vriendelijke groet,

Peter Berkenbosch

john

unread,
Sep 25, 2008, 4:17:36 PM9/25/08
to radiant...@googlegroups.com
Does this happen with every extension in the registry or just paperclipped?

Peter Berkenbosch

unread,
Sep 25, 2008, 4:40:52 PM9/25/08
to radiant...@googlegroups.com
I just tried reorder extenstion, this gives me the same error.

Peter.

john

unread,
Sep 25, 2008, 4:46:47 PM9/25/08
to radiant...@googlegroups.com
Are you by any chance running on ruby 1.8.7? If so can you try on a
ruby 1.8.6 install?

Peter Berkenbosch

unread,
Sep 25, 2008, 4:51:35 PM9/25/08
to radiant...@googlegroups.com
mmm yes it is a ruby 1.8.7... I will give it a shot at my slice with a 1.8.6

Peter.

Peter Berkenbosch

unread,
Sep 25, 2008, 4:57:51 PM9/25/08
to radiant...@googlegroups.com
This is a problem... it is working with ruby version 1.8.6... 

I need it on my local machine, any ideas how I can fix it? Reverting back to 1.8.6 I guess,,,, have to find out how..

Peter.

john

unread,
Sep 25, 2008, 5:06:17 PM9/25/08
to radiant...@googlegroups.com
Might have a look at the Phusion 1.8.6 ruby package (http://www.rubyenterpriseedition.com/). It's easy to install and doesn't touch your system version of ruby. You just adjust your PATH to look in the Phusion ruby/bin directory ahead of your system bin.

Peter Berkenbosch

unread,
Sep 25, 2008, 5:07:39 PM9/25/08
to radiant...@googlegroups.com
Wil do that! Thanks!

Peter.

Jim Gay

unread,
Sep 25, 2008, 5:13:44 PM9/25/08
to radiant...@googlegroups.com

Peter Berkenbosch

unread,
Sep 26, 2008, 2:36:32 AM9/26/08
to radiant...@googlegroups.com
Thanks Jim,

I can see how I can help.

Peter.

Michael Kessler

unread,
Sep 29, 2008, 3:15:01 AM9/29/08
to radiant...@googlegroups.com
Hi all

The problem descibed comes from an incompatibility between Ruby 1.8.7 and Rails 2.0.2. To solve the problem, you can monkey patch it:

unless '1.9'.respond_to?(:force_encoding)
  String.class_eval do
    begin
      remove_method :chars
    rescue NameError
      # OK
    end
  end
end

Add the snippet to the top of your config/environment.rb.

Michael
          self.extension = load_extensions.find{|e| e.name <http://e.name>  == self.extension_name }
        end

Anyone ?

Peter Berkenbosch

unread,
Sep 30, 2008, 3:10:40 AM9/30/08
to radiant...@googlegroups.com
Thanks!

I will try it this evening... Normaly I'm not so keen on using monkey patching... but hey.... it this is fixing my issue... why not :)

Peter

Peter Berkenbosch

unread,
Oct 17, 2008, 3:53:12 AM10/17/08
to radiant...@googlegroups.com
Installing REE fixed my problem.

Thx for the input!

Peter.
Reply all
Reply to author
Forward
0 new messages