Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV generation error since customizable update #201

Closed
bbonamin opened this issue Jun 16, 2011 · 11 comments
Closed

CSV generation error since customizable update #201

bbonamin opened this issue Jun 16, 2011 · 11 comments
Labels

Comments

@bbonamin
Copy link
Contributor

Hey guys,

Since updating to ActiveAdmin 0.2.1 (I'm on 0.2.2 now and still it isn't working), CSV outputs don't work for me anymore, neither default or customized output. I get the following error:

NameError in Admin/towplanes#index

Showing /home/bcb/.rvm/gems/ruby-1.9.2-p136/bundler/gems/active_admin-7d7f31fb620f/lib/active_admin/views/templates/active_admin/resource/index.csv.erb where line #6 raised:

uninitialized constant ActionView::CompiledTemplates::CSV
Extracted source (around line #6):

3:            require 'fastercsv'
4:            FasterCSV
5:          else
6:            CSV
7:          end
8: 
9: 
Rails.root: /home/bcb/Dropbox/rails/cpr

Could anyone help me solve this? Thanks in advance.

@knoopx
Copy link
Contributor

knoopx commented Jun 16, 2011

I confirm this

@bbonamin
Copy link
Contributor Author

It appears to be something with the development environment. CSV generation works correctly in Heroku for example

@pcreux
Copy link
Contributor

pcreux commented Jun 17, 2011

Could you provide the versions of Ruby and Rails you are using?

@ghost ghost assigned pcreux Jun 17, 2011
@TheKidCoder
Copy link
Contributor

I am getting

undefined method csv for #<ActiveAdmin::DSL:0x00000105101610> (NoMethodError)

when trying to boot development server. I am on Rails 3.0.6 with Ruby 1.9.2.

@pcreux
Copy link
Contributor

pcreux commented Jun 17, 2011

Thanks.

I don't have time to look into that right now. In the meantime, you could check if there is anything wrong in here: https://github.com/gregbell/active_admin/blob/81f655dcfebbc29fa15dded90f5609ba054a1fd1/lib/active_admin/views/templates/active_admin/resource/index.csv.erb

@pcreux
Copy link
Contributor

pcreux commented Jun 17, 2011

Could you see if the version on github/master fixes this issue?

@TheKidCoder
Copy link
Contributor

Found the issue. Created pull request.
See here: #209

@bbonamin
Copy link
Contributor Author

@pcreux I'm using Rails 3.0.9 with Ruby 1.9.2 as well.

@pcreux
Copy link
Contributor

pcreux commented Jun 18, 2011

This should now be fixed on master thanks to @TheKidCoder.

Commit c6e4776.

@bbonamin @knoopx Can you guys confirm that this solves the issue?

@bbonamin
Copy link
Contributor Author

I can confirm it's working now, thank you!

@pcreux
Copy link
Contributor

pcreux commented Jun 20, 2011

@bbonamin Great! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants