Sono relativamente nuovo alla programmazione, quindi spero che la domanda non sia assolutamente stupida.File da importare non trovato o illeggibile: bootstrap
Ho un problema riguardante la mia app di rotaie.
Provo a utilizzare il bootstrap. Ho creato un file chiamato "custom.css.scss" e ho utilizzato la riga "@import" bootstrap "" al suo interno.
Il problema è: Ogni volta che salgo il file "custom.css.scss" viene generato automaticamente un nuovo file "custom.css" e viene visualizzato il seguente messaggio: "file custom.css.scss da importare non trovato o illeggibile: bootstrap ".
La cosa divertente è: quando elimino il file "custom.css.scss" e aggiorno il browser, tutto è a posto (il che significa che è utilizzato bootstrap).
Avete qualche idea, quale potrebbe essere la ragione?
Cordiali saluti Chris
PS: Questo è il mio file gioiello installato
source 'https://rubygems.org'
gem 'rails', '3.2.11'
gem 'bootstrap-sass', '2.1'
gem 'bcrypt-ruby', '3.0.1'
gem 'faker', '1.0.1'
gem 'will_paginate', '3.0.3'
gem 'bootstrap-will_paginate', '0.0.6'
gem 'jquery-rails', '2.0.2'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.11.0'
# gem 'guard-rspec', '1.2.1'
# gem 'guard-spork', '1.2.0'
# gem 'spork', '0.9.2'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
group :test do
gem 'capybara', '1.1.2'
gem 'factory_girl_rails', '4.1.0'
gem 'cucumber-rails', '1.2.1', :require => false
gem 'database_cleaner', '0.7.0'
gem 'launchy', '2.1.0'
# gem 'rb-fsevent', '0.9.1', :require => false
# gem 'growl', '1.0.3'
end
group :production do
gem 'pg', '0.12.2'
end
L'aspetto del file custom.css.scss come questo
@import "bootstrap";
/* universal */
html {
overflow-y:scroll
}
body {
padding-top: 60px
}
section {
overflow: auto;
}
textarea {
resize: vertial;
}
.center {
text-align: center;
}
.center h1 {
margin-bottom: 10px;
}
/* typography */
h1, h2, h3, h4, h5, h6 {
line-height: 1
}
h1 {
font-size: 3em;
letter-spacing: -2px;
margin-bottom: 30px;
text-align: center;
}
h2 {
font-size: 1.7em;
letter-spacing: -1px;
margin-bottom: 30px;
text-align: center;
font-weight: normal;
color: #999;
}
p {
font-size: 1.1em;
line-height: 1.7em;
}
Potresti postare cosa 'custom.css.scss' assomiglia a dove stai facendo l'importazione? – Zkoh
Sicuro. Assomiglia a questo: @import "bootstrap"; /* universale */ html { \t di overflow-y: scorrere } body { \t padding-top: 60px } sezione { \t overflow: auto; } textarea { \t ridimensionamento: vertial; } .center { \t text-align: center; } .center h1 { \t margine-fondo: 10px; } /* * tipografia/ h1, h2, h3, h4, h5, h6 { \t line-height: 1 } h1 { \t font-size: 3em; \t letter-spacing: -2px; \t margin-bottom: 30px; \t allineamento del testo: centro; } h2 { \t font-size: 1.7em; \t letter-spacing: -1px; \t margin-bottom: 30px; \t allineamento del testo: centro; \t peso carattere: normale; \t colore: # 999; } p { \t font-size: 1.1em; \t altezza linea: 1,7em; } – BiallaC
Hai: 1) eseguito "installazione bundle" dopo aver modificato il tuo Gemfile e 2) riavvia il tuo server di rotaie? –