`
sillycat
  • 浏览: 2542518 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Linux Deploy Rails3 with Ruby1.9.2(5)Fix the Error Messages

阅读更多
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 %>


references:
1
http://stackoverflow.com/questions/7238194/sprocketsenvironmentpath-is-deprecated
http://stackoverflow.com/questions/7130010/rails-3-1-0-assets-folder-not-rendering-sprocketsenvironmentstatic-root-is-de
3
https://github.com/chriseppstein/compass/issues/337
http://stackoverflow.com/questions/6115015/how-does-one-load-a-css-framework-in-rails-3-1

分享到:
评论

相关推荐

    linuxdeploy-2.6.0-259.apk

    安卓平台虚拟机,最新版下载地址:...linuxdeploy-2.6.0-259.apk 为目前最新版(2020-02-01更新),最低支持Android 5.0。Android 4.4 支持版本:https://download.csdn.net/download/zhyjie100/12254490。

    Linux Deploy.zip

    Linux Deploy是一款专为Android设备设计的应用程序,它允许用户在Android设备上部署并运行Linux发行版,无需root权限。这个工具对于开发者、系统管理员或对Linux感兴趣的用户来说,是一个非常实用的工具,因为它使得...

    linuxdeploy

    linuxdeploy

    linuxdeploy-2.1.0-237.apk

    This application is open source software for quick and easy installation of the operating system (OS) GNU/Linux on your Android device. The application creates a disk image or a directory on a flash ...

    linuxdeploy-2.5.1-257.apk和linuxdeploy-2.6.0-259 .apk

    Linuxdeploy是Linux系统中用于构建AppImage的工具,它能够帮助开发者将应用程序及其依赖打包成一个可执行的文件,使得用户无需安装即可运行。这里提到的`linuxdeploy-2.5.1-257.apk`和`linuxdeploy-2.6.0-259.apk`...

    linuxdeploy-x86_64.AppImage

    linux下的程序,打包为.AppImage

    Linux Deploy安装包 2.6版本

    可用于手机安装Linux环境 供无法使用Play商店小伙伴下载

    linuxdeploy,在android上安装并运行gnu/linux.zip

    5. **运行Linuxdeploy**:使用Linuxdeploy工具将容器映像部署到Android设备上。它会处理库文件的依赖关系,创建一个独立的运行环境。 6. **启动Linux环境**:部署完成后,你可以通过Termux或者其他支持Linux的应用...

    Android-linuxdeploy.zip

    Android-linuxdeploy.zip,在android上安装并运行gnu/linux,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。

    Linux deploy 32位系统 怎么安装宝塔怎么安装linux系统安装宝塔后搭建网站

    5. **执行安装**:在Linux Deploy中配置系统信息,如发行版(CentOS7)、安装类型(分区),然后开始安装。 **二、安装CentOS7** 1. **配置Linux Deploy**:在应用内设置镜像源、网络、启动选项等。 2. **执行安装...

    install-linuxdeploy-action:github运行linuxdeploy的动作

    install-linuxdeploy-action 在Github Actions工作流程上安装LinuxDeploy的操作。 请参阅LinuxDeploy主页上的linuxdeploy实用程序详细信息。 该操作可以处理LinuxDeploy的插件。 您可以指定插件和要安装的目标目录...

    kali-armhf-rootfs-linuxdeploy2.02-223.tar.gz rootfs 离线镜像安装包

    1.2020年6月4日09:27:41 积分调整1 ...linuxdeploy2.02-223.备份的离线镜像。可直接导入 kali-armhf aarch64 这个好像是32位的 如果需要安装jdk,直达https://download.csdn.net/download/zl20110000/11173517

    Deploy Rails Application

    Rails 经典开发参考书, Ruby on rails 系近年来在西方日渐盛行的一套网页开发工具,其高度集成化时开发时间大大缩短.

    Agile Web Development with Rails Final

    Ruby on Rails (often shortened as Rails) is a server-side web application framework written in Ruby under the MIT License. It uses Model-View-Controller (MVC) architecture and emphasizes convention ...

    jdk-8u211-linux-arm64-vfp-hflt.tar.gz aarch64 chroot linuxdeploy 64位linux

    描述中提到,这个JDK可以用于"linuxdeploy"工具,这是一个用于构建和部署Linux应用程序容器的工具,特别适合于在aarch64架构的ARM设备上,比如手机。"已验证centos7 aarch64可用"意味着这个JDK已经在CentOS 7的64位...

    Beginning.Ruby.From.Novice.to.Professional.3rd.Edition.1484212797

    Chapter 5: The Ruby Ecosystem Part 2: The Core of Ruby Chapter 6: Classes, Objects, and Modules Chapter 7: Projects and Libraries Chapter 8: Documentation, Error Handling, Debugging, and Testing ...

    Android-x86 Linux Deploy 部署1

    3. 使用Linux Deploy进行配置,选择Ubuntu作为发行版,版本可以是trusty(14.04)或xenial(16.04),架构选为amd64。设置镜像源为中国的镜像服务器,如http://mirrors.ustc.edu.cn/ubuntu/。 4. 指定安装路径,可以...

    Linux Deploy_2.5.0.apk

    Linux Deploy_2.5.0.apk

    linuxdeploy-cli:Linux部署CLI

    linuxdeploy-cli:Linux部署CLI

Global site tag (gtag.js) - Google Analytics