在rails应用程序中将引导程序流水线化到我的ruby中以对其进行样式化

时间:2015-03-02 15:58:03

标签: ruby-on-rails ruby twitter-bootstrap server

我刚刚添加了宝石' bootstrap-sass','〜> 3.3.3'进入我的gemfile页面。我重新安装捆绑包如下(指定):

 Fetching gem metadata from https://rubygems.org/..........
    Fetching version metadata from https://rubygems.org/..
    Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.7.0
Installing json 1.8.2
Installing minitest 5.5.1
Installing thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.2.0
Installing builder 3.2.2
Installing erubis 2.7.0
Installing mini_portile 0.6.2
Installing nokogiri 1.6.6.2
Installing rails-deprecated_sanitizer 1.0.3
Installing rails-dom-testing 1.0.5
Installing loofah 2.0.1
Installing rails-html-sanitizer 1.0.1
Installing actionview 4.2.0
Installing rack 1.6.0
Installing rack-test 0.6.3
Installing actionpack 4.2.0
Installing globalid 0.3.3
Installing activejob 4.2.0
Installing mime-types 2.4.3
Installing mail 2.6.3
Installing actionmailer 4.2.0
Installing activemodel 4.2.0
Installing arel 6.0.0
Installing activerecord 4.2.0
Installing execjs 2.3.0
Installing autoprefixer-rails 5.1.7
Installing debug_inspector 0.0.2
Installing binding_of_caller 0.7.2
Installing sass 3.4.13
Installing bootstrap-sass 3.3.3
Using bundler 1.8.3
Installing columnize 0.9.0
Installing debugger-linecache 1.2.0
Installing slop 3.6.0
Installing byebug 3.5.1
Installing coffee-script-source 1.9.1
Installing coffee-script 2.3.0
Installing thor 0.19.1
Installing railties 4.2.0
Installing coffee-rails 4.1.0
Installing hike 1.2.3
Installing multi_json 1.10.1
Installing jbuilder 2.2.8
Installing jquery-rails 4.0.3
Installing tilt 1.4.1
Installing sprockets 2.12.3
Installing sprockets-rails 2.2.4
Installing rails 4.2.0
Installing rdoc 4.2.0
Installing sass-rails 5.0.1
Installing sdoc 0.4.1
Installing spring 1.3.3
Installing sqlite3 1.3.10
Installing turbolinks 2.5.3
Installing uglifier 2.7.1
Installing web-console 2.1.0
Bundle complete! 14 Gemfile dependencies, 59 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!

直到这里都很好。

然后我将代码@import "bootstrap";添加到styles.css.scss文件中。 我重新启动服务器以进行更改以反映在localhost:3000中 然后发生这种情况:

    rails server
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Could not find autoprefixer-rails-5.1.7 in any of the sources
Run `bundle install` to install missing gems.

我尝试过运行&#39;捆绑安装&#39;但令我沮丧的是,同样的错误一次又一次地悄然而至。 所以在一个jist中,服务器没有开始引用&#34;它无法找到autoprefixer-rails-5.1.7 gem&#34;但如果您检查上面的脚本,它实际上已经安装了它。

请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

我运行了命令bundle exec rails s。服务器现在运行。但是如果执行命令rails s,它仍然没有运行。它会抛出相同的错误。