【问题标题】:Asset Precompile on Amazon LinuxAmazon Linux 上的资产预编译
【发布时间】:2013-08-31 10:01:10
【问题描述】:

我在一个小型 amazon linux 实例上安装了 locomotivecms 应用程序。我跑了以下来预编译资产:

bundle exec rake assets:precompile

已经有半个小时了,资产仍在预编译中。以下是我目前在终端上的内容:

[ec2-user@domU-12-31-39-09-15-88 locomotivecms]$ bundle exec rake assets:precompile
/home/ec2-user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby /home/ec2-user/.rvm/gems/ruby-1.9.3-p448/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
which: no convert in (/home/ec2-user/.rvm/gems/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/ec2-user/.rvm/rubies/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)
which: no identify in (/home/ec2-user/.rvm/gems/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/ec2-user/.rvm/rubies/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)
mkdir -p /home/ec2-user/locomotivecms/public/assets
cp -rp /home/ec2-user/.rvm/gems/ruby-1.9.3-p448/gems/locomotive-tinymce-rails-3.5.8.2/vendor/assets/javascripts/tinymce /home/ec2-user/locomotivecms/public/assets
mkdir -p /home/ec2-user/locomotivecms/public/assets
cp -rp /home/ec2-user/.rvm/gems/ruby-1.9.3-p448/gems/locomotive-aloha-rails-0.23.2.2/vendor/assets/javascripts/aloha /home/ec2-user/locomotivecms/public/assets
which: no convert in (/home/ec2-user/.rvm/gems/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/ec2-user/.rvm/rubies/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)
which: no identify in (/home/ec2-user/.rvm/gems/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/ec2-user/.rvm/rubies/ruby-1.9.3-p448/bin:/home/ec2-user/.rvm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin)

which 命令是否意味着要花费时间为每个正在预编译的文件查找 rake 可执行文件?

【问题讨论】:

    标签: ruby-on-rails amazon-ec2 precompile


    【解决方案1】:

    好像你没有安装 imagemagick。

    根据您的发行版,它应该是 sudo yum install ImageMagick ImageMagick-develsudo apt-get install imagemagick

    你可以通过convert或者identify来测试它是否安装成功。

    但是,文档建议您在自己的本地机器上进行预编译,而不是在远程服务器上。意思是,您首先在自己的机器上发出bundle exec rake assets:precompile。这样可以避免在远程服务器上进行预编译。

    【讨论】:

    • 谢谢。正如你提到的 Imagemagick 丢失了。安装后,我不再看到 which: no convert, which: no identify 消息。
    猜你喜欢
    • 2012-03-14
    • 1970-01-01
    • 1970-01-01
    • 2016-03-22
    • 2017-12-12
    • 2012-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多