twitter-archive / clockworkraven

Human-Powered Data Analysis with Mechanical Turk
http://twitter.github.com/clockworkraven/
Apache License 2.0
300 stars 58 forks source link

Unable to upload files #9

Closed jrubinstein closed 12 years ago

jrubinstein commented 12 years ago

I've tried on several occasions to upload a csv file to clockwork, but I get an error.

NoMethodError in EvaluationsController#create

undefined method `force_encoding' for #String:0x7f26bf21e930

Rails.root: /home/jrubinstein/clockworkraven Application Trace | Framework Trace | Full Trace

lib/input_parser.rb:26:in parse' app/controllers/evaluations_controller.rb:102:increate'

any idea what's going on? I've got CR running in a VM running Ubuntu 12

daveFNbuck commented 12 years ago

Can you verify that you're using ruby 1.9 and rails 3?

jrubinstein commented 12 years ago

rails -v

Rails 3.2.1

ruby -v

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

echen commented 12 years ago

I wonder if you have multiple versions of Ruby installed, and Rails is running a different one.

What do you get if you enter rails console in the terminal, and type RUBY_VERSION at the prompt?

jrubinstein commented 12 years ago

Hi all, I wiped my VM and started from scratch, not using RVM, and installing everything through apt-get, and now it seems to work. I did have a blocker with nokogiri, as the 1.5.3 version wouldn't install. But I could get 1.5.5 to install, so we just changed the install gemfile to point to 1.5.5. Everything seems to be working now.

echen commented 12 years ago

Awesome, glad it's working. Let us know if you run into other troubles.