将引导程序管道化到我的ruby on rails应用程序中以进行样式化



我刚刚在gemfile页面中添加了gem"bootstrap sass","~>3.3.3"。我按照如下方式(按照规定)重新安装捆绑包:

 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.

我试着运行"捆绑安装",但令我沮丧的是,同样的错误一次又一次地出现。因此,在jist中,服务器不会开始引用"它找不到autoprefixer-rails-5.1.7gem",但如果你检查上面的脚本,它实际上已经安装了它。

请帮我解决这个问题。

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

最新更新