我正在尝试将我的应用程序移动到另一台服务器,我目前收到以下错误。
'twitter/bootstrap/responsive.less' wasn't found (in /home/rails/**/app/assets/stylesheets/bootstrap_and_overrides.css.less)
我的gemfile中没有:assets块 - 所以此问题的先前解决方案不适用于我的情况。
这是我的Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
#gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
#For User Management
gem 'devise'
gem 'cancan'
gem 'rolify'
#For adding attachments
gem 'paperclip', github: 'thoughtbot/paperclip'
#For Bootstrap
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'bootstrap_form'
gem 'debugger'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails'
# Use debugger
#gem 'debugger'
任何帮助表示赞赏!我对此错误或多或少一无所知。
附加说明:我的应用程序在我当前的服务器上正常运行,但我无法让它在我的新服务器上运行一次,而且我试图以相同的方式安装它。
答案 0 :(得分:11)
当我没有在我的gemfile中指定特定版本时,我无意中最终将twitter-bootstrap-rails
更新为3.2.0。之前的版本是2.2.8,我回滚到现在一切正常。新版本缺少responsive.less文件。
答案 1 :(得分:8)
twitter-bootstrap-rails版本3.2.0的设置与版本2.2.8不同。 如果要使用版本3.2.0,则还必须更新设置。为此,请运行以下命令:
rails generate bootstrap:install less