发布时间:2014-09-05 17:00:39作者:知识屋
Linux Deploy Rails3 with Ruby1.9.2(5)Fix the Error Messages
1. Sprockets::Environment#path is deprecated
we have 2 ways to solve this, it is harmless warning message
one way is to upgrade our rails from rc5 to rc8.
>gem install rails -v=3.1.0.rc8
>vi Gemfile
gem 'rails', '3.1.0.rc8'
>bundle update
the other way is to put this gem 'sprockets', '2.0.0.beta.15' into our Gemfile.
>bundle update sprockets
2. Insecure world writable dir
/home/luohua/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9/gems/passenger-3.0.8/lib/phusion_passenger/platform_info/operating_system.rb:98: warning: Insecure world writable dir /home/luohua/.rvm/rubies/ruby-1.9.2-p290/bin in PATH, mode 040777
>sudo chmod go-x -R /home/luohua/.rvm/rubies/ruby-1.9.2-p290/bin
>sudo chmod go-w ~/.rvm
3. something went wrong
I can see some message on the pages as follow:
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
check the project log directory and the production.log
Started GET "/project" for xxx.xxx.xxx.xxx at 2011-09-01 08:11:22 +0800
Processing by HomeController#index as HTML
Rendered home/index.html.erb (333.5ms)
Completed 500 Internal Server Error in 549ms
ActionView::Template::Error (Invalid CSS after "...t YaHei, SimHei": expected "{", was ";}"
(in /opt/work/projectname/app/assets/stylesheets/application.css)):
5: <link href="/assets/styles.css" type="text/css" rel="stylesheet" />
6: <link href="/assets/IE.css" type="text/css" rel="stylesheet" />
7: <script type="text/javascript" src="https://www.google.com/jsapi"></script>
8: <%= stylesheet_link_tag "application" %>
9: <%= javascript_include_tag "application" %>
10: <%= csrf_meta_tags %>
11: <title>projectname</title>
app/views/home/index.html.erb:8:in `_app_views_home_index_html_erb___579589567_96323830'
That is because of the 'sprockets' version. I hate this and redhat4. I just change to rc8 way, but this problem still there.
I clean up all the directory, and download my project again. Everything is fine then. I think I may benefit from update the system to rc8, and without anything changes in Gemfile. So just upgrade the system, but do not change your Gemfile, just use the old one as follow:
gem 'rails', '3.1.0.rc5'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#gem 'sqlite3'
#gem 'mysql', '2.8.1'
gem 'mysql2'
gem 'execjs'
#gem 'therubyracer'
gem 'libv8'
4. How to make comments in erb files
This is not deployment issue, but development issue. If we want to make large comments in erb files, we can do like this:
<% if false %>
balababalalalala
blablalalalalalalalalaladkala
<% end %>
作者“快马扬鞭须努力!”
linux一键安装web环境全攻略 在linux系统中怎么一键安装web环境方法
Linux网络基本网络配置方法介绍 如何配置Linux系统的网络方法
Linux下DNS服务器搭建详解 Linux下搭建DNS服务器和配置文件
对Linux进行详细的性能监控的方法 Linux 系统性能监控命令详解
linux系统root密码忘了怎么办 linux忘记root密码后找回密码的方法
Linux基本命令有哪些 Linux系统常用操作命令有哪些
Linux必学的网络操作命令 linux网络操作相关命令汇总
linux系统从入侵到提权的详细过程 linux入侵提权服务器方法技巧
linux系统怎么用命令切换用户登录 Linux切换用户的命令是什么
在linux中添加普通新用户登录 如何在Linux中添加一个新的用户
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能