redmine3.3.3 rake db:migrate 报错invalid byte sequence in US-ASCII (Argument Error) 解决方法
这个错误有点莫名其妙,系统默认的就是utf-8,可bundle就是不对。。
rake db:migrate 结果没有任何错误,反而是网页passenger 提示了这个错误
参考:https://github.com/imathis/octopress/issues/144
解决方法:
- 在 ~/.bash_profile 中添加一行 export RUBYOPT="-KU -E utf-8:utf-8"
$ cat ~/.bash_profile [[-s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* export RUBYOPT="-KU -E utf-8:utf-8"
清空gem后再次bundle就可以了。我用的ruby 1.9.3 + redmine 3.3.3;请根据自己的环境调节命令。
rvm gemset empty rvm use 1.9. --default;gem install bundler;sudo rm -rf Gemfile.lock;bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java;bundle install --without development test bundle exec rake redmine:plugins:migrate RAILS_ENV=production;sudo service apache2 reload;sleep ;sudo service apache2 restart
重新打开网页显示正常。
redmine3.3.3 rake db:migrate 报错invalid byte sequence in US-ASCII (Argument Error) 解决方法的更多相关文章
- 【pycharm】pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法
pycharm上安装tensorflow,报错:AttributeError: module 'pip' has no attribute 'main' 解决方法 解决方法: 在pycharm的安装目 ...
- 使用IDEA操作Hbase API 报错:org.apache.hadoop.hbase.client.RetriesExhaustedException的解决方法:
使用IDEA操作Hbase API 报错:org.apache.hadoop.hbase.client.RetriesExhaustedException的解决方法: 1.错误详情: Excepti ...
- Picard报错“MAPQ should be 0 for unmapped read”的解决方法
picard对bwa生成的sam文件进行reorder时,报错如下: Getting Help Exception in thread "main" htsjdk.samtools ...
- 启动tomcat时,报错:IOException while loading persisted sessions: java.io.EOFException解决方法
报错原因:加载持久化session错误,tomcat加载时读取的文件是是*.ser,session序列化文件,文件的位置是tomcat\work\Catalina\localhost,找到sessio ...
- 编译lua5.3.2报错提示libreadline.so存在未定义的引用解决方法
从官网上下载5.3.2的源码后,make linux进行编译,提示报错: gcc -std=gnu99 -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline ...
- 安装SQl Server 报错 "需要 Microsoft.NET Framework 3.5 ServicePack 1" 解决方法
前言 之前装Sql Server都没遇到过这样的问题, 昨天重装了系统之后, 然后安装SQl Server 报错,提示 "需要 Microsoft.NET Framework 3.5 Ser ...
- composer 报错:Failed to decode response: zlib_decode(): data error 解决办法
执行命令 composer require particle/validator 报错 Failed to decode response: zlib_decode(): data error 网上推 ...
- 安装apr-1.6.3报错[cannot remove `libtoolT’: No such file or directory]解决方法
发现有这个提示:cannot remove `libtoolT’: No such file or directory , 编辑 configure文件,查找 $RM "$cfgfile&q ...
- 关于Python运行代码报错:SyntaxError: Non-ASCII character '\xe5' in file的解决方法
运行python文件报错如上 解决办法: # -*- coding: UTF- -*- 或者 #coding=utf- (注:此语句一定要添加在源代码的第一行) 原因:Python默认是以ASCII作 ...
随机推荐
- Python全栈2期 备忘
http://www.cnblogs.com/linhaifeng/ http://www.cnblogs.com/alex3714/ http://www.cnblogs.com/wupeiqi/ ...
- python操作数据库-数据表
数据表: 数据类型: 帮助的三种形式: 在cmd中输入: help 要帮助的主题词,或 ? 要帮助的主题词 或 \h 要帮助的主题词 . 数据表的创建: CREATE database IF NOT ...
- Spring Boot的自动配置的原理浅析
一.原理描述 Spring Boot在进行SpringApplication对象实例化时会加载META-INF/spring.factories文件,将该配置文件中的配置载入到Spring容器. 二. ...
- Python安装setuptools遇到的MARKER_EXPR错误
# python setup.py install Traceback (most recent call last): File "setup.py", line 11, i ...
- C#-派生类
VS派生类 继承.派生类 class AClass : FClass 构建函数继承 public classname (string astring): base(astring){};默认不继承基类 ...
- 第二届普适计算和信号处理及应用国际会议论文2016年 The 2nd Conference on Pervasive Computing, Signal Processing and Applications(PCSPA, 2016)
A New Method for Mutual Coupling Correction of Array Output Signal 一种阵列输出信号互耦校正的新方法 Research of Robu ...
- afx_msg解释
以前一直不知道AFX_MSG是什么意思,只是觉得它应该是个消息映射函数,但是具体代表什么意思,会返回一个什么样的值是一点都不清楚,今天查了下资料,把查到的东西放这,以免以后忘了还得再查. 在头文件(D ...
- EBS FORM 编译
http://www.cnblogs.com/quanweiru/archive/2013/01/01/2841574.html EBS R11============================ ...
- C99 中 main 函数的写法
今天在论坛看见有人讨论 C 语言中 main 函数的写法,看到结论才知道 main 函数的正确写法. 被老谭酸菜坑了这么多年,还是记录下吧,或许以后某天不搞 .net,回去折腾 C 语言了. 写法1: ...
- Unity核心对象模型
总结的Unity引擎部分的核心对象模型类图,供大家学习时参考,根基类为Object,下一层包括核心基类GameObject,及其他作为资源的Mesh,Material,Shader,Texture,S ...