gpt4 book ai didi

ruby-on-rails - 启动瘦服务器时加载 bootstrap-sass 时出现问题,rails

转载 作者:行者123 更新时间:2023-12-04 07:31:44 24 4
gpt4 key购买 nike

我正在尝试启动我的瘦服务器。这不起作用,失败并出现以下错误:

myApp/gems/bootstrap-sass-2.1.0.0/lib/bootstrap-sass.rb:18:in `load!': 
bootstrap-sass requires either Rails > 3.1 or Compass, neither of which
are loaded (Bootstrap::FrameworkNotFound)
from /Users/MyName/.rvm/gems/ruby-1.9.3-p194@myApp/gems/bootstrap-sass-2.1.0.0/lib/bootstrap-sass.rb:43:in `<top (required)>'
*a bounch of more lines indicating code lines*

我尝试使用 gem 'compass' 而不是 'compass-rails'。那没有结果。我试图将它放在我的 :assets 组之外,但没有运气。这是怎么回事?

我无法找到有关此的任何信息。我的 gemfile 看起来像这样:
source 'https://rubygems.org'

gem 'rails', '3.2.8'
gem 'pg', '0.12.2'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
gem "bootstrap-sass", ">= 2.1.0.0"
gem 'uglifier', '>= 1.0.3'
end

group :test do
gem 'shoulda'
gem 'mocha'
end

gem 'jquery-rails'
gem "thin", ">= 1.4.1"
gem "rspec-rails", ">= 2.11.0", :group => [:development, :test]
gem "capybara", ">= 1.1.2", :group => :test
gem "email_spec", ">= 1.2.1", :group => :test
gem "cucumber-rails", ">= 1.3.0", :group => :test, :require => false
gem "database_cleaner", ">= 0.8.0", :group => :test
gem "launchy", ">= 2.1.2", :group => :test
gem "factory_girl_rails", ">= 4.0.0", :group => [:development, :test]

gem "devise", ">= 2.1.2"
gem "cancan", ">= 1.6.8"
gem "rolify", ">= 3.2.0"
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'paperclip', '~> 3.0'
gem 'ayah_integration'
gem 'rails_autolink'

最佳答案

所以,我发现了问题所在。这很愚蠢..所以:

在我的 config.ru 文件中,我有以下内容:

...
require 'bootstrap-sass'
require ::File.expand_path('../config/environment', __FILE__)
...

它应该是相反的:
...
require ::File.expand_path('../config/environment', __FILE__)
require 'bootstrap-sass'
...

关于ruby-on-rails - 启动瘦服务器时加载 bootstrap-sass 时出现问题,rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12508164/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com