2013-08-23 69 views
0

我已經在這裏跟着指示:https://github.com/Ink/filepicker-rails主動聯繫Filepicker.io錯誤

config.filepicker_rails.api_key = "MyApiKey"中的config/application.rb中和filepicker.io腳本正在我的應用程序佈局通過<%= filepicker_js_include_tag %>調用。

我有這個在我的管理/ geography.rb文件:

form do |f| 
    f.inputs "Town" do 
    f.input :town 
    f.input :name 
    f.filepicker_field :filepicker_url 
    end 
    f.actions 
end 

我我的管理頁面上得到的錯誤是:

RuntimeError in Admin::Geographies#new 

Showing /Users/user/.rvm/gems/[email protected]/bundler/gems/active_admin-72a9c30cef47/app/views/active_admin/resource/new.html.arb where line #1 raised: 

Set config.filepicker_rails.api_key 

Extracted source (around line #1): 
1: insert_tag renderer_for(:edit) 

任何人都經歷這樣或有一個解決方案?我試圖將它移動到我的初始化程序/ active_admin.rb文件,但沒有運氣,我不知道還有什麼地方可以尋找補救措施。在github文檔以外的RoR Filepicker.io實現似乎沒有太多的信息。

+0

你可以顯示什麼提出? – polmiro

+0

@polmiro你的意思是錯誤?它是'Set config.filepicker_rails.api_key' –

+0

您是否曾經在ActiveAdmin中使用過'f.filepicker_field:filepicker_url'代碼?在我的活動管理員表單中,該字段不顯示。 – RTIndy

回答