<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>countcain (Cain)</title>
    <link>https://ruby-china.org/countcain</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>关于 assets-pipeline 的一些问题</title>
      <description>&lt;p&gt;在 config/application.rb 中，已经设置 config.assets.enabled = true，将 pipeline 开启，
那么在网页访问时，app/assets/javascripts/ 下的所有文件都会被打包到 application.js 中对吧？
可是我在 development 模式下 rails server 后，访问 localhost，查看源码时，显示的是：&lt;/p&gt;

&lt;p&gt;1 // This is a manifest file that'll be compiled into application.js, which will include all the files
  2 // listed below.&lt;br&gt;
  3 // 
  4 // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
  5 // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
  6 //
  7 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
  8 // the compiled file.&lt;br&gt;
  9 //
 10 // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
 11 // GO AFTER THE REQUIRES BELOW.
 12 //&lt;br&gt;
 13 //= require jquery
 14 //= require jquery_ujs&lt;br&gt;
 15 //= require_tree .
 16 //= require bootstrap&lt;br&gt;
 17 
 18 !function( $ ) {&lt;br&gt;
 19 
 20    // Picker object&lt;br&gt;
 21 
 22  .....&lt;/p&gt;

&lt;p&gt;即依旧是原先 application.js 中的内容，require 的 jquery bootstrap 都未打包进去。
Gemfile 的配置应该是没有问题的。还有哪儿可能造成这样的结果？&lt;/p&gt;</description>
      <author>countcain</author>
      <pubDate>Sun, 25 Aug 2013 00:37:21 +0800</pubDate>
      <link>https://ruby-china.org/topics/13586</link>
      <guid>https://ruby-china.org/topics/13586</guid>
    </item>
    <item>
      <title>require_tree . 失效 (实在很奇葩)</title>
      <description>&lt;p&gt;项目是一个仓库管理的应用，帮助学校开发的。
在 app/assets/stylesheets/ 目录下 我放置了 bootstrap 的源码，并在 application.css 中 require_tree . 了
项目在自己的 linode 上 rails s development 模式运行，bootstrap 的 css 效果能够显示。
貌似目录下所有 css 都编译压缩到 application.css 中了，因为我右键查看网页源码确实只有一个 applicaition.css。所以一切正常。&lt;/p&gt;

&lt;p&gt;但是由于需求改变，我在 os x 下 clone 下来，需要增加些功能，rails s 时，app/assets/stylesheets/ 目录下的*.css 都无法编译加载至 application.css 中，bootstrap 的 css 效果无法显示。
我寻找了很多原因。
在 application.html.erb 中 stylesheet_link_tag 处没有问题，require_tree . 也写了。
但就是无法将目录下的 css 都 require 进来。
其实在两个环境下代码是一样的，为何跑出的效果不同？&lt;/p&gt;

&lt;p&gt;同学们，能麻烦看看不。项目地址：
&lt;a href="https://github.com/countcain/warehouse2" rel="nofollow" target="_blank"&gt;https://github.com/countcain/warehouse2&lt;/a&gt;
可否请 clone 下来，帮我在您的机器上跑跑看有没有这样的问题？
clone 后需要自己建一个 database.yml 简单写个配置。
实在是不知哪儿错了~~~哎
跪谢！&lt;/p&gt;</description>
      <author>countcain</author>
      <pubDate>Sat, 24 Aug 2013 20:28:28 +0800</pubDate>
      <link>https://ruby-china.org/topics/13583</link>
      <guid>https://ruby-china.org/topics/13583</guid>
    </item>
    <item>
      <title>require 'sass' 出现 load error</title>
      <description>&lt;p&gt;很简单的 require‘sass’但是 load error 了&lt;/p&gt;

&lt;p&gt;rb 文件
  1 require 'sinatra'
  2 require 'haml'
  3 require 'sass'
  4 
  5 configure do
  6    set :haml, :format =&amp;gt; :html5
  7    set :scss, :style =&amp;gt; :compact
  8 end
  9 
 10 get '/css/layout.css' do
 11    scss :layout
 12 end
 13 
 14 get '/' do
 15    haml :index
 16 end&lt;/p&gt;

&lt;p&gt;ruby *.rb 时，
出现：
PeachtekiMacBook-Air:freya cain$ ruby freya.rb 
/Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in &lt;code&gt;require': cannot load such file -- sass (LoadError)
    from /Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in&lt;/code&gt;rescue in require'
    from /Users/cain/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in &lt;code&gt;require'
    from freya.rb:3:in&lt;/code&gt;&lt;/p&gt;'&lt;p&gt;&lt;/p&gt;</description>
      <author>countcain</author>
      <pubDate>Wed, 24 Jul 2013 20:43:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/12751</link>
      <guid>https://ruby-china.org/topics/12751</guid>
    </item>
    <item>
      <title>gemfile 里引用 gem 的 github 地址</title>
      <description>&lt;blockquote&gt;
&lt;p&gt;如果我在 Gemfile 中声明 Gem 时，使用的是 github 的地址，比如&lt;/p&gt;

&lt;p&gt;gem 'rails',     github: 'rails/rails'
gem "mongoid", git: '&lt;a href="https://github.com/mongoid/mongoid.git" rel="nofollow" target="_blank"&gt;https://github.com/mongoid/mongoid.git&lt;/a&gt;'&lt;/p&gt;

&lt;p&gt;那么我在 bundle install 后，会 receiving 该 gem 的 git 仓库，请问它存在了本地的哪里？
我的系统是 osx 10.8&lt;/p&gt;
&lt;/blockquote&gt;</description>
      <author>countcain</author>
      <pubDate>Fri, 05 Jul 2013 15:31:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/12274</link>
      <guid>https://ruby-china.org/topics/12274</guid>
    </item>
  </channel>
</rss>
