configatron

    0熱度

    1回答

    我對Ruby很新穎(儘管不是編程),並且正在嘗試創建持久配置。雖然我認爲使用Configatron會自動使我的配置持久,但似乎並非如此。我將如何在多次運行中保持這一點?我應該將其存儲到文件中嗎?如果是這樣,怎麼樣?我會認爲~/.myapp文件可能會很好?

    1熱度

    2回答

    我正在使用configatron gem作爲由ActiveRecord備份的新Rails應用程序。我的一些configatron設置在文件中設置,有些是從DB拉,因爲他們會改變不時地,這裏有幾行從我configatron.rb configatron.app.uptime.start = Time.now configatron.email.signature = Setting.where(:

    2熱度

    1回答

    我正在使用configtron來存儲我的配置值。除非範圍在類的方法內,否則我可以毫無問題地訪問配置值。 我使用configatron 3.0.0-RC1使用Ruby 2.0.0 下面是我用了所謂的 'tc_tron.rb' require 'configatron' class TcTron def simple(url) puts "-------entering sim

    0熱度

    2回答

    在我的應用程序中,我使用的是configatron gem。問題是我不明白我應該在哪裏存儲configtron設置。我把configatron.application_url = 'http://google.com/'放在config/configatron/defaults.rb中,但這不起作用。在視圖configatron.application_url顯示#<Configatron::St

    2熱度

    1回答

    我使用記錄儀,通過配置和這一行: configatron.log.level = Logger::Warn 給我的錯誤: `<top (required)>': uninitialized constant Logger::Warn (NameError) 即使我需要「記錄」的最佳。 是什麼給出的? <紅寶石N00B>