Hi y used your gem and I have this problem. When I make the installations steps and trying to import, I recived this;
LoadError in TurnsController#import
Using Roo::Google requires the google_drive gem
Rails.root: /home/ciro/pruebaCalendario
Application Trace | Framework Trace | Full Trace
app/controllers/turns_controller.rb:93:in `import'
Next if include gem 'google_drive' in the Gmefile, the method send send_notification returns this before import:
Fatal error while importing data: undefined method `spreadsheet_by_key' for nil:NilClass
I tried to solve this for a many days ago, but I can't find the problem. The form that I used is this:
<%= form_tag import_turns_path, :class => 'form-horizontal', :multipart => true do %>
<%= file_field_tag :file, :class => "btn btn-small btn-primary btn" %>
<%= submit_tag "Import", :class => "btn btn-small btn-primary btn" %>
<% end %>
And the controller:
def import
TurnImporter.import(params[:file].path)
redirect_to :action => "index"
end
I would apreciate it if somebody could help me. Sorry my english is very bad, for this I leave the same problem in spanish. Thanks
Hola estoy usando su gema y ocurre el siguiente problema. Cuando hago los pasos de instalación que ustedes indican y hago el import me sale el siguiente error:
LoadError in TurnsController#import
Using Roo::Google requires the google_drive gem
Rails.root: /home/ciro/pruebaCalendario
Application Trace | Framework Trace | Full Trace
app/controllers/turns_controller.rb:93:in `import'
Acto seguido, si incluyo en el Gemfile gem 'google_drive', el médoto send_notification me devuelve el siguiente error, antes de comenzar a importar:
Fatal error while importing data: undefined method `spreadsheet_by_key' for nil:NilClass
Llevo varios días tratando de solucionarlo y no logro hallar el error. El formulario que estoy utilizando es el siguiente:
<%= form_tag import_turns_path, :class => 'form-horizontal', :multipart => true do %>
<%= file_field_tag :file, :class => "btn btn-small btn-primary btn" %>
<%= submit_tag "Import", :class => "btn btn-small btn-primary btn" %>
<% end %>
y en el controlador
def import
TurnImporter.import(params[:file].path)
redirect_to :action => "index"
end
si alguien me pudiera dar alguna idea se los agradecería.