Ruby on Rails
Wednesday, September 1, 2010
On Wed, Sep 1, 2010 at 12:50 PM, Renato Isidio <lists@ruby-forum.com> wrote:
Hi everyone!
Im trying to install mechanizer from
http://github.com/tenderlove/mechanize.
I`ve clone the project into /tmp folder. When I do rake inside the
folder /tmp/mechanizer it gives me this error:
mac159180:mechanize renatosis$ rake
(in /private/tmp/mechanize)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w
-Ilib:bin:test:. -e 'require "rubygems"; require "test/unit"; require
"test/chain/test_argument_validator.rb"; require
"test/chain/test_auth_headers.rb"; require
"test/chain/test_custom_headers.rb"; require
"test/chain/test_header_resolver.rb"; require
"test/chain/test_parameter_resolver.rb"; require
"test/chain/test_request_resolver.rb"; require
"test/chain/test_response_reader.rb"; require
"test/test_authenticate.rb"; require "test/test_bad_links.rb"; require
"test/test_blank_form.rb"; require "test/test_checkboxes.rb"; require
"test/test_content_type.rb"; require "test/test_cookie_class.rb";
require "test/test_cookie_jar.rb"; require "test/test_cookies.rb";
require "test/test_encoded_links.rb"; require "test/test_errors.rb";
require "test/test_field_precedence.rb"; require
"test/test_follow_meta.rb"; require "test/test_form_action.rb"; require
"test/test_form_as_hash.rb"; require "test/test_form_button.rb"; require
"test/test_form_no_inputname.rb"; require "test/test_forms.rb"; require
"test/test_frames.rb"; require "test/test_get_headers.rb"; require
"test/test_gzipping.rb"; require "test/test_hash_api.rb"; require
"test/test_headers.rb"; require "test/test_history.rb"; require
"test/test_history_added.rb"; require "test/test_html_unscape_forms.rb";
require "test/test_if_modified_since.rb"; require "test/test_links.rb";
require "test/test_mech.rb"; require "test/test_mech_proxy.rb"; require
"test/test_mechanize_file.rb"; require "test/test_meta.rb"; require
"test/test_multi_select.rb"; require "test/test_no_attributes.rb";
require "test/test_option.rb"; require "test/test_page.rb"; require
"test/test_pluggable_parser.rb"; require "test/test_post_form.rb";
require "test/test_pretty_print.rb"; require "test/test_radiobutton.rb";
require "test/test_redirect_limit_reached.rb"; require
"test/test_redirect_verb_handling.rb"; require "test/test_referer.rb";
require "test/test_relative_links.rb"; require "test/test_request.rb";
require "test/test_response_code.rb"; require "test/test_save_file.rb";
require "test/test_scheme.rb"; require "test/test_select.rb"; require
"test/test_select_all.rb"; require "test/test_select_none.rb"; require
"test/test_select_noopts.rb"; require "test/test_set_fields.rb"; require
"test/test_ssl_server.rb"; require "test/test_subclass.rb"; require
"test/test_textarea.rb"; require "test/test_upload.rb"; require
"test/test_util.rb"; require "test/test_verbs.rb"' --
Loaded suite -e
Started
...............................................................E...........................................................................................................................................................................................................................................EEEE.EE...
Finished in 1.068686 seconds.
1) Error:
test_post_multipart(FormsMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"first_name\"\r\n\r\n\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_forms.rb:187:in `test_post_multipart'
2) Error:
test_form_enctype(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"name\"\r\n\r\n\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_upload.rb:29:in `test_form_enctype'
3) Error:
test_form_io_obj(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"name\"\r\n\r\n\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_upload.rb:83:in `test_form_io_obj'
4) Error:
test_form_multipart(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"name\"\r\n\r\n\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_upload.rb:52:in `test_form_multipart'
5) Error:
test_form_read_file(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"name\"\r\n\r\n\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_upload.rb:66:in `test_form_read_file'
6) Error:
test_submit_no_file(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
"Content-Disposition: form-data; name=\"name\"\r\n\r\nAaron\r\n":String
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:387:in `submit'
./test/test_upload.rb:96:in `test_submit_no_file'
7) Error:
test_upload_with_post_param(UploadMechTest):
NoMethodError: undefined method `force_encoding' for
#<String:0x102401188>
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize/form.rb:229:in `collect'
./lib/mechanize/form.rb:229:in `request_data'
./lib/mechanize.rb:483:in `post_form'
./lib/mechanize.rb:374:in `post'
./test/test_upload.rb:10:in `test_upload_with_post_param'
309 tests, 1510 assertions, 0 failures, 7 errors
rake aborted!
Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]
(See full trace by running task with --trace)
Can you help me?
Thanks in advance.
Renato
String#force_encoding (http://rubydoc.info/docs/ruby-core/1.9.2/String#force_encoding-instance_method) is a Ruby 1.9 method, and you're using Ruby 1.8. It looks like the version you're trying to install is written only for Ruby 1.9. You probably need to find an older version.
Adam
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment