美文网首页
Rails 折腾

Rails 折腾

作者: DeanWang | 来源:发表于2021-03-23 09:36 被阅读0次

    老项目,rails 4.2.8,新服务器 ruby 2.5.5版本。重新启动项目

    gem 'rails', '4.2.8'
    ruby 2.5.5p157
    

    1 passenger-install-nginx-module

    passenger-install-nginx-module 不再支持在已安装的nginx上安装,只支持从nginx的源码编译;编译后配置server即可
    直接从源码编译nginx; 通过 /data/nginx/sbin/nginx 命令直接启动自定义安装的nginx

    2 gem mysql2 支持mariadb

    需要安装 libmariadb-dev-compat; apt-get install libmariadb-dev-compat 然后使用 0.4.10版本, 直接改Gemfile.lock文件

    4 rmagick

    error/constitute.c/ReadImage/572 no decode delegate for this image format
    convert 命令无法转换文件,报错
    convert: no decode delegate for this image format `PNG' @
    两个是一个问题,没有png格式的解码器,从源码安装imagemagick的时候需要先安装好png,jpg等一系列的dev包
    搜索 libpng,libjpg,libfreetype,安装运行包和dev包,然后重新安装imagemagick;http://www.imagemagick.org/script/install-source.php 安装imagemagick后解决

    imagemagick ./configure 命令输出的DELEGATES中应该包括如下的模块:

    DELEGATES       = bzlib djvu fontconfig freetype jbig jng jpeg lcms lqr lzma openexr openjp2 png ps tiff video webp x xml zlib
    

    3 RAILS_ENV=production rails c 进行调试

    相关文章

      网友评论

          本文标题:Rails 折腾

          本文链接:https://www.haomeiwen.com/subject/ekixhltx.html