I execute
我执行
$ heroku run rake assets:clean
Running `rake assets:clean` attached to terminal... up, run.2
/usr/local/bin/ruby /app/vendor/bundle/ruby/1.9.1/bin/rake assets:clean:all RAILS_ENV=production RAILS_GROUPS=assets
rm -rf /app/public/assets
But it doesn't look like it is working due I can access to the assets by http request and also if I open a heroku console I can see the files:
但由于我可以通过http请求访问资产,因此看起来它看起来不起作用,如果我打开一个heroku控制台,我可以看到这些文件:
$ heroku run console
irb(main):013:0> Dir.glob "./public/assets/*"
=> ["./public/assets/img", "./public/assets/application.js.gz", "./public/assets/application.js", "./public/assets/rails.png", "./public/assets/manifest.yml", "./public/assets/application.css", "./public/assets/assets", "./public/assets/application.css.gz"]
I need to remove the assets because they are producing conflicts with my new configuration.
我需要删除资产,因为它们与我的新配置产生冲突。
2 个解决方案
#1
22
The rake assets:clean functionality has been replaced with
rake资产:清洁功能已被替换
rake assets:clobber
in the latest version of Rails.
在最新版本的Rails中。
https://github.com/rails/sprockets-rails/blob/master/README.md
https://github.com/rails/sprockets-rails/blob/master/README.md
#2
3
I had to do:
我必须做:
heroku repo:purge_cache
and wait a bit. rake assets:clobber
did not work for me, even though it printed:
等一下rake assets:clobber对我来说不起作用,即使它打印出来:
INFO -- : Removed /app/public/assets
rm -rf /app/tmp/cache/assets]
if you run the heroku command and get:
如果你运行heroku命令并得到:
! `repo:purge_cache` is not a heroku command.
! See `heroku help` for a list of available commands.
install the command in your heroku toolbelt with:
在heroku工具带中安装命令:
heroku plugins:install https://github.com/heroku/heroku-repo.git
and rerun.
并重新运行。
#1
22
The rake assets:clean functionality has been replaced with
rake资产:清洁功能已被替换
rake assets:clobber
in the latest version of Rails.
在最新版本的Rails中。
https://github.com/rails/sprockets-rails/blob/master/README.md
https://github.com/rails/sprockets-rails/blob/master/README.md
#2
3
I had to do:
我必须做:
heroku repo:purge_cache
and wait a bit. rake assets:clobber
did not work for me, even though it printed:
等一下rake assets:clobber对我来说不起作用,即使它打印出来:
INFO -- : Removed /app/public/assets
rm -rf /app/tmp/cache/assets]
if you run the heroku command and get:
如果你运行heroku命令并得到:
! `repo:purge_cache` is not a heroku command.
! See `heroku help` for a list of available commands.
install the command in your heroku toolbelt with:
在heroku工具带中安装命令:
heroku plugins:install https://github.com/heroku/heroku-repo.git
and rerun.
并重新运行。