当我尝试在application.yml文件上推送更改时,我总是通过命令使用figaro gem:
$ rake figaro:heroku
我很久没有这样做了,但我今天试过了,我收到了这个错误:
mathieu@mathieu-To-be-filled-by-O-E-M:~/rails_projects/graalio_app$ rake figaro:heroku --trace
DEPRECATION WARNING: Support for Rails < 4.1.0 will be dropped. (called from require at /home/mathieu/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76)
rake aborted!
Don't know how to build task 'figaro:heroku'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/task_manager.rb:62:in `[]'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:149:in `invoke_task'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/rake:23:in `load'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/rake:23:in `<main>'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/ruby_executable_hooks:15:in `eval'
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/bin/ruby_executable_hooks:15:in `<main>'
编辑:
发表评论后,检查了figaro gem的最新信息:https://github.com/laserlemon/figaro#heroku-configuration
我试过了:
$ figaro heroku:set -e production
但我得到错误:
/home/mathieu/.rvm/gems/ruby-2.0.0-p451@rails3tutorial2ndEd/gems/figaro-1.0.0/lib/figaro/cli/task.rb:28:in `system': no implicit conversion of Array into String (TypeError)
答案 0 :(得分:0)
该值应为引号。
docker cp
答案 1 :(得分:0)
这个命令对我有用:
bundle exec figaro heroku:set -e production