I have a rails 2.3.5 app getting upgraded to Rails 3. I did every thing I am required to do for upgrading and when I start the rails server using
rails server
it gives me this
Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus
support for Ruby 1.9's m17n encoding engine.
I am using ruby-1.9.2-p0
and have fastercsv (1.5.3) gem
installed. with the help of puts statements, i was able to track down where the error occurred. i found that the execution stops at this line
Bundler.require(:default, Rails.env) if defined?(Bundler)
in application.rb file. I tried many things but none worked .. please help..
Remove fasterCSV from your Gemfile in the application. Bundler is trying to require FasterCSV because you have it specified in the Gemfile.
with 1.9 you no longer need/can use the fastercsv gem, since it's bundled in the std lib. Now you just need to do:
require 'csv'
CSV.open("temp.csv", "w") do |csv|
csv << ["line1row1", "line1row2"]
csv << ["line2row1", "line2row2"]
# ...
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With