We are running production rails application on two different servers. After precompiling the assets on the respective servers the asset digest we get are totally different.
application-8d36938ed5deae12e5cc20d3df80db04.css
application-17cc63a0983ee30dda2eb3e8a2403e4b.css
On exploring further both the css files had different contents. For the same color rule both css file have different values
For Example:
background-color: white; -> in server A
background-color: #fff; -> in server B
This kind of dissimilarities is found in lot of place inside that file.
I examined the Gemfile and Gemfile.lock they are same in both the servers. What would be the reason? Can someone explain?
I guessed the problem is due to the different versions of nodejs in both the machines, cause asset pre-compilation is dependent on nodejs. So we tried tried to get nodejs version on both the machines to same version, even though this error is occuring. What am I missing here?
UPDATE:
Linux versions:
Server 1:
$ cat /etc/debian_version
8.0
Server 2:
$ cat /etc/debian_version
7.5
NodeJs versions:
Server 1:
$ nodejs -v
v0.10.29
$ dpkg -l | grep nodejs
ii nodejs 0.10.29~dfsg-1~bpo70+1 amd64 evented I/O for V8 javascript
Server 2:
$ nodejs -v
v0.10.29
$ dpkg -l | grep nodejs
ii nodejs 0.10.29~dfsg-2 amd64 evented I/O for V8 javascript
Gemfile.lock:
Server 1:
# Gemfile.lock
GIT
remote: git://github.com/sporkrb/spork-rails.git
revision: 0dd45e59d3237b4c8f9efc215b46d9c07072a95e
specs:
spork-rails (4.0.0)
rails (>= 3.0.0, < 5)
spork (>= 1.0rc0)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.0)
actionpack (= 4.0.0)
mail (~> 2.5.3)
actionpack (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.4)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.4.0)
amq-protocol (2.0.1)
arel (4.0.2)
awesome_print (1.6.1)
aws-sdk (2.2.12)
aws-sdk-resources (= 2.2.12)
aws-sdk-core (2.2.12)
jmespath (~> 1.0)
aws-sdk-resources (2.2.12)
aws-sdk-core (= 2.2.12)
bcrypt (3.1.10)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
beefcake (0.3.7)
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
bloomfilter-rb (2.1.1)
redis
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
will_paginate
bootstrap3-datetimepicker-rails (3.0.0.2)
momentjs-rails (~> 2.5.0)
builder (3.1.4)
bunny (1.4.1)
amq-protocol (>= 1.9.2)
capybara (2.5.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chartkick (1.4.1)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
coderay (1.1.0)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
color (1.8)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.2.3)
devise (3.5.6)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise_ldap_authenticatable (0.8.4)
devise (>= 3.4.1)
net-ldap (>= 0.3.1, < 0.6.0)
diff-lcs (1.2.5)
docile (1.1.5)
elasticsearch (1.0.15)
elasticsearch-api (= 1.0.15)
elasticsearch-transport (= 1.0.15)
elasticsearch-api (1.0.15)
multi_json
elasticsearch-transport (1.0.15)
faraday
multi_json
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.6.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fastercsv (1.5.5)
ffi (1.9.10)
font-awesome-rails (4.5.0.0)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-livereload (2.5.1)
em-websocket (~> 0.5)
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
guard-rspec (4.6.4)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
guard-spork (2.1.0)
childprocess (>= 0.2.3)
guard (~> 2.0)
guard-compat (~> 1.0)
spork (>= 0.8.4)
high_voltage (2.2.1)
hike (1.2.3)
http_parser.rb (0.6.0)
httpclient (2.7.1)
i18n (0.7.0)
innertube (1.0.2)
jbuilder (2.4.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jmespath (1.1.3)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
log4r (1.1.10)
lumberjack (1.0.10)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile2 (2.0.0)
minitest (4.7.5)
momentjs-rails (2.5.1)
railties (>= 3.1)
mono_logger (1.1.0)
multi_json (1.11.2)
multipart-post (2.0.0)
mysql (2.9.1)
nenv (0.2.0)
net-ldap (0.5.1)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nori (2.6.0)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
open4 (1.3.4)
orm_adapter (0.5.0)
pdf-writer (1.1.8)
color (>= 1.4.0)
transaction-simple (~> 1.3)
polyglot (0.3.5)
pony (1.11)
mail (>= 2.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.5.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.0.0)
actionmailer (= 4.0.0)
actionpack (= 4.0.0)
activerecord (= 4.0.0)
activesupport (= 4.0.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0)
sprockets-rails (~> 2.0.0)
rails-footnotes (4.1.7)
rails (>= 3.2)
railties (4.0.0)
actionpack (= 4.0.0)
activesupport (= 4.0.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
redis (3.2.2)
redis-namespace (1.5.2)
redis (~> 3.0, >= 3.0.4)
responders (1.1.2)
railties (>= 3.2, < 4.2)
resque (1.25.2)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
riak-client (1.4.4.1)
beefcake (~> 0.3.7)
builder (>= 2.1.2)
i18n (>= 0.4.0)
innertube (~> 1.0.2)
multi_json (~> 1.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.2)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-rails (3.4.0)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
ruby_protobuf (0.4.11)
ruport (1.6.3)
fastercsv
pdf-writer (= 1.1.8)
safe_yaml (1.0.4)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sequel (4.30.0)
shellany (0.0.1)
shoulda-matchers (2.6.2)
activesupport (>= 3.0.0)
simple-graphite (2.1.0)
simplecov (0.11.1)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
slop (3.6.0)
spork (1.0.0rc4)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.11)
term_extraction (0.1.7)
crack (>= 0.1.6)
thin (1.6.4)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
transaction-simple (1.4.0.2)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (0.3.46)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
vegas (0.1.11)
rack (>= 1.0.0)
voldemort-rb (0.1.9)
nokogiri (>= 1.4.3.1)
ruby_protobuf (>= 0.3.3)
warden (1.2.6)
rack (>= 1.0)
will_paginate (3.1.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
addressable (= 2.4.0)
awesome_print (= 1.6.1)
aws-sdk (= 2.2.12)
bcrypt-ruby (= 3.1.5)
better_errors (= 2.1.1)
bloomfilter-rb (= 2.1.1)
bootstrap-sass (= 3.1.1.1)
bootstrap-will_paginate (= 0.0.10)
bootstrap3-datetimepicker-rails (~> 3.0.0.1)
bunny (= 1.4.1)
capybara (= 2.5.0)
chartkick (= 1.4.1)
childprocess (= 0.5.9)
chronic (= 0.10.2)
devise (~> 3.5, >= 3.5.6)
devise_ldap_authenticatable (~> 0.8.4)
elasticsearch (~> 1.0.2)
factory_girl_rails (= 4.5.0)
font-awesome-rails (= 4.5.0.0)
guard-livereload (= 2.5.1)
guard-rspec (= 4.6.4)
guard-spork (= 2.1.0)
high_voltage (= 2.2.1)
httpclient (~> 2.6, >= 2.6.0.1)
jbuilder (= 2.4.0)
jquery-rails (= 3.1.4)
log4r (= 1.1.10)
momentjs-rails (= 2.5.1)
mysql (= 2.9.1)
net-ldap (~> 0.5.1)
nori (~> 2.6)
open4 (= 1.3.4)
pony (= 1.11)
quiet_assets (= 1.1.0)
rails (= 4.0.0)
rails-footnotes (= 4.1.7)
resque (= 1.25.2)
riak-client (= 1.4.4.1)
rspec-rails (= 3.4.0)
ruport (= 1.6.3)
sass-rails (= 5.0.4)
sdoc (= 0.3.20)
sequel (= 4.30.0)
shoulda-matchers (= 2.6.2)
simple-graphite (= 2.1.0)
simplecov (= 0.11.1)
spork-rails!
sprockets (= 2.11.0)
sqlite3 (= 1.3.11)
term_extraction (= 0.1.7)
thin (= 1.6.4)
turbolinks (= 2.5.3)
uglifier (= 2.7.2)
voldemort-rb (= 0.1.9)
Server 2:
# Gemfile.lock
GIT
remote: git://github.com/sporkrb/spork-rails.git
revision: 0dd45e59d3237b4c8f9efc215b46d9c07072a95e
specs:
spork-rails (4.0.0)
rails (>= 3.0.0, < 5)
spork (>= 1.0rc0)
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.0)
actionpack (= 4.0.0)
mail (~> 2.5.3)
actionpack (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.4)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.4.0)
amq-protocol (2.0.1)
arel (4.0.2)
awesome_print (1.6.1)
aws-sdk (2.2.12)
aws-sdk-resources (= 2.2.12)
aws-sdk-core (2.2.12)
jmespath (~> 1.0)
aws-sdk-resources (2.2.12)
aws-sdk-core (= 2.2.12)
bcrypt (3.1.10)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
beefcake (0.3.7)
better_errors (2.1.1)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
rack (>= 0.9.0)
bloomfilter-rb (2.1.1)
redis
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
will_paginate
bootstrap3-datetimepicker-rails (3.0.0.2)
momentjs-rails (~> 2.5.0)
builder (3.1.4)
bunny (1.4.1)
amq-protocol (>= 1.9.2)
capybara (2.5.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
chartkick (1.4.1)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
coderay (1.1.0)
coffee-rails (4.1.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
color (1.8)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.2.3)
devise (3.5.6)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise_ldap_authenticatable (0.8.4)
devise (>= 3.4.1)
net-ldap (>= 0.3.1, < 0.6.0)
diff-lcs (1.2.5)
docile (1.1.5)
elasticsearch (1.0.15)
elasticsearch-api (= 1.0.15)
elasticsearch-transport (= 1.0.15)
elasticsearch-api (1.0.15)
multi_json
elasticsearch-transport (1.0.15)
faraday
multi_json
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.0.9.1)
execjs (2.6.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fastercsv (1.5.5)
ffi (1.9.10)
font-awesome-rails (4.5.0.0)
railties (>= 3.2, < 5.0)
formatador (0.2.5)
guard (2.13.0)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-livereload (2.5.1)
em-websocket (~> 0.5)
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
guard-rspec (4.6.4)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
guard-spork (2.1.0)
childprocess (>= 0.2.3)
guard (~> 2.0)
guard-compat (~> 1.0)
spork (>= 0.8.4)
high_voltage (2.2.1)
hike (1.2.3)
http_parser.rb (0.6.0)
httpclient (2.7.1)
i18n (0.7.0)
innertube (1.0.2)
jbuilder (2.4.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jmespath (1.1.3)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
log4r (1.1.10)
lumberjack (1.0.10)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.2)
mime-types (1.25.1)
mini_portile2 (2.0.0)
minitest (4.7.5)
momentjs-rails (2.5.1)
railties (>= 3.1)
mono_logger (1.1.0)
multi_json (1.11.2)
multipart-post (2.0.0)
mysql (2.9.1)
nenv (0.2.0)
net-ldap (0.5.1)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nori (2.6.0)
notiffany (0.0.8)
nenv (~> 0.1)
shellany (~> 0.0)
open4 (1.3.4)
orm_adapter (0.5.0)
pdf-writer (1.1.8)
color (>= 1.4.0)
transaction-simple (~> 1.3)
polyglot (0.3.5)
pony (1.11)
mail (>= 2.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.5.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (4.0.0)
actionmailer (= 4.0.0)
actionpack (= 4.0.0)
activerecord (= 4.0.0)
activesupport (= 4.0.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.0)
sprockets-rails (~> 2.0.0)
rails-footnotes (4.1.7)
rails (>= 3.2)
railties (4.0.0)
actionpack (= 4.0.0)
activesupport (= 4.0.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
redis (3.2.2)
redis-namespace (1.5.2)
redis (~> 3.0, >= 3.0.4)
responders (1.1.2)
railties (>= 3.2, < 4.2)
resque (1.25.2)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.3)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
riak-client (1.4.4.1)
beefcake (~> 0.3.7)
builder (>= 2.1.2)
i18n (>= 0.4.0)
innertube (~> 1.0.2)
multi_json (~> 1.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.2)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-rails (3.4.0)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
ruby_protobuf (0.4.11)
ruport (1.6.3)
fastercsv
pdf-writer (= 1.1.8)
safe_yaml (1.0.4)
sass (3.4.21)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
sequel (4.30.0)
shellany (0.0.1)
shoulda-matchers (2.6.2)
activesupport (>= 3.0.0)
simple-graphite (2.1.0)
simplecov (0.11.1)
docile (~> 1.1.0)
json (~> 1.8)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
slop (3.6.0)
spork (1.0.0rc4)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.11)
term_extraction (0.1.7)
crack (>= 0.1.6)
thin (1.6.4)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (~> 1.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
transaction-simple (1.4.0.2)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (0.3.46)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
vegas (0.1.11)
rack (>= 1.0.0)
voldemort-rb (0.1.9)
nokogiri (>= 1.4.3.1)
ruby_protobuf (>= 0.3.3)
warden (1.2.6)
rack (>= 1.0)
will_paginate (3.1.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
addressable (= 2.4.0)
awesome_print (= 1.6.1)
aws-sdk (= 2.2.12)
bcrypt-ruby (= 3.1.5)
better_errors (= 2.1.1)
bloomfilter-rb (= 2.1.1)
bootstrap-sass (= 3.1.1.1)
bootstrap-will_paginate (= 0.0.10)
bootstrap3-datetimepicker-rails (~> 3.0.0.1)
bunny (= 1.4.1)
capybara (= 2.5.0)
chartkick (= 1.4.1)
childprocess (= 0.5.9)
chronic (= 0.10.2)
devise (~> 3.5, >= 3.5.6)
devise_ldap_authenticatable (~> 0.8.4)
elasticsearch (~> 1.0.2)
factory_girl_rails (= 4.5.0)
font-awesome-rails (= 4.5.0.0)
guard-livereload (= 2.5.1)
guard-rspec (= 4.6.4)
guard-spork (= 2.1.0)
high_voltage (= 2.2.1)
httpclient (~> 2.6, >= 2.6.0.1)
jbuilder (= 2.4.0)
jquery-rails (= 3.1.4)
log4r (= 1.1.10)
momentjs-rails (= 2.5.1)
mysql (= 2.9.1)
net-ldap (~> 0.5.1)
nori (~> 2.6)
open4 (= 1.3.4)
pony (= 1.11)
quiet_assets (= 1.1.0)
rails (= 4.0.0)
rails-footnotes (= 4.1.7)
resque (= 1.25.2)
riak-client (= 1.4.4.1)
rspec-rails (= 3.4.0)
ruport (= 1.6.3)
sass-rails (= 5.0.4)
sdoc (= 0.3.20)
sequel (= 4.30.0)
shoulda-matchers (= 2.6.2)
simple-graphite (= 2.1.0)
simplecov (= 0.11.1)
spork-rails!
sprockets (= 2.11.0)
sqlite3 (= 1.3.11)
term_extraction (= 0.1.7)
thin (= 1.6.4)
turbolinks (= 2.5.3)
uglifier (= 2.7.2)
voldemort-rb (= 0.1.9)
Related
I have a Rails 6.0.3.4 application. If i make a change to CSS and refresh the browser, the change is not shown. Changes to CSS only work when i delete the rails temp folder using:
$ rails tmp:clear
I am currently using rubymine. Every other project works perfectly except this specific project.
This is my Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', '6.0.3.4'
gem 'image_processing', '1.9.3'
gem 'mini_magick', '4.9.5'
gem 'active_storage_validations', '0.8.9'
gem 'bcrypt', '3.1.13'
gem 'faker', '2.11.0'
gem 'will_paginate', '3.3.0'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '3.4.1'
gem 'puma', '4.3.5'
gem 'sass-rails', '6.0.0'
gem 'webpacker', '4.2.2'
gem 'turbolinks', '5.2.1'
gem 'jbuilder', '2.10.0'
gem 'bootsnap', '1.4.6', require: false
gem 'pg', '1.2.3'
group :development, :test do
gem 'byebug', '11.1.3', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '4.0.2'
gem 'listen', '3.2.1'
gem 'spring', '2.1.1'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'capybara', '3.32.2'
gem 'selenium-webdriver', '3.142.7'
gem 'webdrivers', '4.3.0'
gem 'rails-controller-testing', '1.0.4'
gem 'minitest', '5.11.3'
gem 'minitest-reporters', '1.3.8'
gem 'guard', '2.16.2'
gem 'guard-minitest', '2.4.6'
end
group :production do
gem 'pg', '1.2.3'
gem 'aws-sdk-s3', '1.46.0', require: false
end
This is my Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.3.4)
actionpack (= 6.0.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
mail (>= 2.7.1)
actionmailer (6.0.3.4)
actionpack (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.3.4)
actionview (= 6.0.3.4)
activesupport (= 6.0.3.4)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.3.4)
actionpack (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
nokogiri (>= 1.8.5)
actionview (6.0.3.4)
activesupport (= 6.0.3.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_storage_validations (0.8.9)
rails (>= 5.2.0)
activejob (6.0.3.4)
activesupport (= 6.0.3.4)
globalid (>= 0.3.6)
activemodel (6.0.3.4)
activesupport (= 6.0.3.4)
activerecord (6.0.3.4)
activemodel (= 6.0.3.4)
activesupport (= 6.0.3.4)
activestorage (6.0.3.4)
actionpack (= 6.0.3.4)
activejob (= 6.0.3.4)
activerecord (= 6.0.3.4)
marcel (~> 0.3.1)
activesupport (6.0.3.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
autoprefixer-rails (10.0.3.0)
execjs
aws-eventstream (1.1.0)
aws-partitions (1.402.0)
aws-sdk-core (3.110.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.39.0)
aws-sdk-core (~> 3, >= 3.109.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.46.0)
aws-sdk-core (~> 3, >= 3.61.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.13)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-will_paginate (1.0.0)
will_paginate
builder (3.2.4)
byebug (11.1.3)
capybara (3.32.2)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.7)
crass (1.0.6)
erubi (1.10.0)
execjs (2.7.0)
faker (2.11.0)
i18n (>= 1.6, < 2)
ffi (1.13.1)
formatador (0.2.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
image_processing (1.9.3)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3)
jbuilder (2.10.0)
activesupport (>= 5.0.0)
jmespath (1.4.0)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.8.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (1.0.0)
mimemagic (0.3.5)
mini_magick (4.9.5)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest-reporters (1.3.8)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.3.3)
nenv (0.3.0)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pg (1.2.3)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (4.3.5)
nio4r (~> 2.0)
rack (2.2.3)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.3.4)
actioncable (= 6.0.3.4)
actionmailbox (= 6.0.3.4)
actionmailer (= 6.0.3.4)
actionpack (= 6.0.3.4)
actiontext (= 6.0.3.4)
actionview (= 6.0.3.4)
activejob (= 6.0.3.4)
activemodel (= 6.0.3.4)
activerecord (= 6.0.3.4)
activestorage (= 6.0.3.4)
activesupport (= 6.0.3.4)
bundler (>= 1.3.0)
railties (= 6.0.3.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.3.4)
actionpack (= 6.0.3.4)
activesupport (= 6.0.3.4)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (1.8.2)
ruby-progressbar (1.10.1)
ruby-vips (2.0.17)
ffi (~> 1.9)
rubyzip (2.3.0)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
shellany (0.0.1)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.8)
thread_safe (~> 0.1)
web-console (4.0.2)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (4.3.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webpacker (4.2.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.0)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
active_storage_validations (= 0.8.9)
aws-sdk-s3 (= 1.46.0)
bcrypt (= 3.1.13)
bootsnap (= 1.4.6)
bootstrap-sass (= 3.4.1)
bootstrap-will_paginate (= 1.0.0)
byebug (= 11.1.3)
capybara (= 3.32.2)
faker (= 2.11.0)
guard (= 2.16.2)
guard-minitest (= 2.4.6)
image_processing (= 1.9.3)
jbuilder (= 2.10.0)
listen (= 3.2.1)
mini_magick (= 4.9.5)
minitest (= 5.11.3)
minitest-reporters (= 1.3.8)
pg (= 1.2.3)
puma (= 4.3.5)
rails (= 6.0.3.4)
rails-controller-testing (= 1.0.4)
sass-rails (= 6.0.0)
selenium-webdriver (= 3.142.7)
spring (= 2.1.1)
spring-watcher-listen (= 2.0.1)
turbolinks (= 5.2.1)
web-console (= 4.0.2)
webdrivers (= 4.3.0)
webpacker (= 4.2.2)
will_paginate (= 3.3.0)
BUNDLED WITH
2.1.4
#app/config/enviroments/development.rb
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports.
config.consider_all_requests_local = true
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
# Use this if developing on localhost.
host = 'localhost:3000'
config.action_mailer.default_url_options = { host: host, protocol: 'http' }
config.action_mailer.perform_caching = false
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
# Suppress logger output for asset requests.
config.assets.quiet = true
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::FileUpdateChecker
end
This is the structure of my stylesheets
├── abstracts
│ ├── _function.scss
│ ├── _mixins.scss
│ └── _variables.scss
├── application.css
├── base
│ ├── _reset.scss
│ ├── _typography.scss
│ └── _utilities.scss
├── components
│ ├── _aside.scss
│ ├── _debug-info.scss
│ ├── _forms.scss
│ ├── _microposts.scss
│ └── _stats.scss
├── custom.scss
├── layouts
│ ├── _aside.scss
│ ├── _footer.scss
│ └── _header.scss
├── main.scss
└── page
├── account_activations.scss
├── microposts.scss
├── password_resets.scss
├── sessions.scss
├── static_pages.scss
└── users.scss
And this is my applicaiton.css
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
* vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
* require_tree .
*= require_self
*= require main
*/
Rails 4.2 added Spring, which keeps the application in memory when you terminate it (to speed up start times), and Rails 5.2 added Bootsnap, which caches optimised code.
I'm using Rails 6.0.3.3 and trad css, and I see css changes applied immediately. Since you're using scss, I'd guess bootsnap is keeping compiled code hanging around.
Try rm -rf tmp/cache/bootsnap-*. Still a pain, but it'll let you know if Bootsnap's the cause.
I've looked through many solutions but still can't find the solution to my problem. I'm using Rails 5.0.0.1, running on Windows OS. I've done bundle install and restarted the server, as well as downgrading the sass-rails but I can't seem to fix the issue.
The gems I needed for this:
bootstrap-sass <3.3.7>
sass-rails <5.0.6, 3.2.0>
In my application.scss file:
#import "bootstrap-sprockets";
#import "bootstrap";
In my application.js file:
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= bootstrap-sprockets
//= require_tree .
The error page
Please help! Thanks!
EDIT
Here is my Gem list:
(It didn't use to have two versions but I think I might have messed it up some how when I downgraded sass-rails and then installed the autoprefixer-rails gem for a different solution I found.)
* LOCAL GEMS *
actioncable (5.0.0.1)
actionmailer (5.0.0.1, 4.2.6)
actionpack (5.0.0.1, 4.2.6, 3.2.
actionview (5.0.0.1, 4.2.6)
activejob (5.0.0.1, 4.2.6)
activemodel (5.0.0.1, 4.2.6, 3.2
activerecord (5.0.0.1, 4.2.6)
activesupport (5.0.0.1, 4.2.6, 3
arel (7.1.2, 7.1.1, 6.0.3)
autoprefixer-rails (6.5.3)
bigdecimal (default: 1.2.6)
binding_of_caller (0.7.2)
bootstrap-sass (3.3.7)
builder (3.2.2, 3.0.4)
bundler (1.13.6, 1.12.5)
byebug (9.0.5)
coffee-rails (4.2.1, 4.1.1)
coffee-script (2.4.1)
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
gem-path (0.6.1)
globalid (0.3.7)
hike (1.2.3)
i18n (0.7.0)
io-console (default: 0.4.3)
jbuilder (2.6.0)
journey (1.0.4)
jquery-rails (4.2.1)
json (1.8.3, default: 1.8.1)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0, 5.4.3)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8 x64-mingw32)
pkg-config (1.1.7)
power_assert (0.2.2)
psych (default: 2.0.8)
puma (3.6.0)
rack (2.0.1, 1.6.4, 1.4.7)
rack-cache (1.6.1)
rack-ssl (1.3.4)
rack-test (0.6.3)
rails (5.0.0.1, 4.2.6)
rails-deprecated_sanitizer (1.0.
rails-dom-testing (2.0.1, 1.0.7)
rails-html-sanitizer (1.0.3)
railties (5.0.0.1, 4.2.6, 3.2.22
rake (11.2.2, default: 10.4.2)
rdoc (4.2.2, default: 4.2.0, 3.1
rubygems-update (2.6.8)
sass (3.4.22, 3.1.21)
sass-rails (5.0.6, 3.2.0)
sdoc (0.4.1)
spring (1.7.2)
sprockets (3.7.0, 2.2.3)
sprockets-rails (3.2.0)
sqlite3 (1.3.11 x64-mingw32)
test-unit (3.0.8)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5, 1.4.1)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
tzinfo-data (1.2016.6)
uglifier (3.0.2)
web-console (3.3.1, 2.3.0)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)
After adding #import "bootstrap-sprockets"; #import "bootstrap"; in your application.scss file, remove all the *= require_self and *= require_tree . statements from the sass file.
I have a problem with migration from Rails 3.2 to Rails 4.2
I fixed the problem but not it is not loading the CSS properly.
Following is my bundle env:
Environment
Bundler 1.10.6
Rubygems 2.0.14
Ruby 2.0.0p576 (2014-09-19 revision 47628) [x86_64-darwin15.0.0]
Git 2.3.8 (Apple Git-58)
Gemfile
source 'https://rubygems.org'
gem 'rake'
gem 'capistrano'
gem 'capistrano-ext'
gem 'rails', '4.2.4'
gem 'mysql2', '~> 0.3.18'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'cancancan', '~> 1.10'
gem 'role_model'
gem 'authlogic'
gem 'aasm'
gem 'newrelic_rpm', :group => [:production]
gem 'by_star', :git => "git://github.com/radar/by_star"
gem 'paper_trail'
gem 'activerecord-session_store'
gem 'responders', '~> 2.0'
### Payment Processing ###
gem 'activemerchant'
gem 'stripe'
gem 'balanced'
### Accounting ###
gem 'acts_as_account'
# gem 'geokit'
# gem 'geokit-rails'
gem 'yajl-ruby'
gem "scoped_search"
gem 'will_paginate'
gem 'devise'
gem 'lob'
# Twilio (Do we need both of these? And what about twilio-ruby?)
gem 'twiliolib'
gem 'twilio-rb', {
git: "git://github.com/stevegraham/twilio-rb.git",
ref: "ac58b8674f064b31b4eb1ff39765e827aa92b99c"
} # https://github.com/stevegraham/twilio-rb/commit/ac58b8674f064b31b4eb1ff39765e827aa92b99c
gem 'xml-simple'
gem 'chronic'
gem 'georuby', require: 'geo_ruby'
gem 'paperclip'
gem "twitter-bootstrap-rails"
gem 'will_paginate-bootstrap'
gem 'simple_form'
gem 'prawn', '0.12.0'
gem 'pdfkit'
gem 'wkhtmltopdf-binary', :group => [:staging, :production, :development]
gem "net-ssh"
gem "highline"
gem "rmagick", "2.13.2"
gem "dbf"
gem 'aws-sdk', '< 2.0'
gem 'phaxio'
gem 'mail'
gem 'less-rails-fontawesome'
gem "rspec-rails", :group => [:test, :development]
gem 'debugger2', :group => [:test, :development]
gem 'less-rails', '~> 2.7.0' #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'nilify_blanks'
gem "auto_strip_attributes", "~> 2.0"
# For Interfax
gem 'typhoeus'
group :octodev, :staging, :production do
gem 'ar-octopus'
end
group :development, :staging do
gem 'rack-mini-profiler'
end
group :development, :test do
gem 'simplecov', '~> 0.7.1', require: false
gem 'timecop'
end
group :development do
gem "parallel_tests"
gem 'growl'
gem 'web-console', '~> 2.0'
end
group :test do
gem 'listen', '0.4.7'
gem "factory_girl_rails"
gem "capybara"
gem 'rspec-steps'
gem "guard-rspec"
gem "rb-fsevent"
gem 'terminal-notifier-guard'
gem 'database_cleaner'
gem 'vcr'
gem 'fakeweb'
gem 'capybara-mechanize'
gem 'capybara-webkit'
gem "selenium-webdriver", "~> 2.38.0"
gem 'ruby_gntp'
end
gem 'sass-rails'
gem 'coffee-rails', '~> 4.0.0'
gem 'uglifier', '~> 1.3.0'
gem "therubyracer", '~> 0.12.0'
#for generating FAKE data
gem 'forgery', '0.5.0'
gem 'redis'
gem 'geocoder'
gem 'rb-readline', '~> 0.4.2'
# Email Stuff
gem 'premailer'
# add these gems to help with the transition:
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
gem 'activerecord-deprecated_finders'
gem 'sprockets', '>= 3.0.0'
gem 'sprockets-es6'
Gemfile.lock
GIT
remote: git://github.com/radar/by_star
revision: d2d997c98b43999283d6c443351dfae3815c02b4
specs:
by_star (2.2.1)
activesupport
GIT
remote: git://github.com/stevegraham/twilio-rb.git
revision: ac58b8674f064b31b4eb1ff39765e827aa92b99c
ref: ac58b8674f064b31b4eb1ff39765e827aa92b99c
specs:
twilio-rb (2.1.3)
activesupport (>= 3.0.0)
builder (>= 2.1.2)
httparty (>= 0.6.1)
i18n (~> 0.5)
jwt (>= 0.1.3)
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.0.2)
aasm (4.3.0)
actionmailer (4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.4)
actionview (= 4.2.4)
activesupport (= 4.2.4)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionpack-action_caching (1.1.1)
actionpack (>= 4.0.0, < 5.0)
actionpack-page_caching (1.0.2)
actionpack (>= 4.0.0, < 5)
actionview (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.4)
activesupport (= 4.2.4)
globalid (>= 0.3.0)
activemerchant (1.54.0)
activesupport (>= 3.2.14, < 5.0.0)
builder (>= 2.1.2, < 4.0.0)
i18n (>= 0.6.9)
nokogiri (~> 1.4)
activemodel (4.2.4)
activesupport (= 4.2.4)
builder (~> 3.1)
activerecord (4.2.4)
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activerecord-deprecated_finders (1.0.4)
activerecord-session_store (0.1.1)
actionpack (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5)
railties (>= 4.0.0, < 5)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
acts_as_account (3.1.2)
actionpack (~> 4.1)
activerecord (~> 4.1)
database_cleaner (~> 1.3)
addressable (2.3.8)
afm (0.2.2)
ar-octopus (0.8.5)
activerecord (>= 3.2.0)
activesupport (>= 3.2.0)
arel (6.0.3)
authlogic (3.4.6)
activerecord (>= 3.2)
activesupport (>= 3.2)
request_store (~> 1.0)
scrypt (>= 1.2, < 3.0)
auto_strip_attributes (2.0.6)
activerecord (>= 3.0)
aws-sdk (1.66.0)
aws-sdk-v1 (= 1.66.0)
aws-sdk-v1 (1.66.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
babel-source (5.8.26)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
balanced (1.2.1)
addressable (~> 2.3.5)
faraday (>= 0.8.6, <= 0.9.0)
faraday_middleware (~> 0.9.0)
bcrypt (3.1.10)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
cancancan (1.13.1)
capistrano (3.4.0)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
capistrano-ext (1.2.1)
capistrano (>= 1.0.0)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
capybara-mechanize (1.4.0)
capybara (~> 2.4.4)
mechanize (~> 2.7.0)
capybara-webkit (1.7.1)
capybara (>= 2.3.0, < 2.6.0)
json
childprocess (0.5.6)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
climate_control (0.0.3)
activesupport (>= 3.0)
cocaine (0.5.7)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.9.1.1)
colorize (0.7.7)
columnize (0.9.0)
commonjs (0.2.7)
css_parser (1.3.7)
addressable
database_cleaner (1.5.1)
dbf (2.0.12)
fastercsv (~> 1.5)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
debugger2 (1.0.0.beta2)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
devise (3.5.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
domain_name (0.5.25)
unf (>= 0.0.5, < 1.0.0)
erubis (2.7.0)
ethon (0.8.0)
ffi (>= 1.3.0)
execjs (2.6.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
fakeweb (1.3.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.9.2)
faraday (>= 0.7.4, < 0.10)
fastercsv (1.5.5)
ffi (1.9.10)
ffi-compiler (0.1.3)
ffi (>= 1.0.0)
rake
forgery (0.5.0)
geocoder (1.2.11)
georuby (2.5.2)
globalid (0.3.6)
activesupport (>= 4.1.0)
growl (1.0.3)
guard (1.5.4)
listen (>= 0.4.2)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-rspec (1.2.2)
guard (>= 1.1)
hashery (2.1.1)
highline (1.7.8)
htmlentities (4.3.4)
httmultiparty (0.3.16)
httparty (>= 0.7.3)
mimemagic
multipart-post
http-cookie (1.0.2)
domain_name (~> 0.5)
httparty (0.13.7)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.7.0)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
railties (>= 3.2.16)
json (1.8.3)
jwt (1.5.1)
less (2.6.0)
commonjs (~> 0.2.7)
less-rails (2.7.0)
actionpack (>= 4.0)
less (~> 2.6.0)
sprockets (> 2, < 4)
tilt
less-rails-fontawesome (0.5.1)
less-rails (>= 2.1.7)
railties (>= 3.1.1)
libv8 (3.16.14.13)
listen (0.4.7)
rb-fchange (~> 0.0.5)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
lob (2.1.2)
rest-client (~> 1.8)
loofah (2.0.3)
nokogiri (>= 1.5.9)
lumberjack (1.0.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mechanize (2.7.3)
domain_name (~> 0.5, >= 0.5.1)
http-cookie (~> 1.0)
mime-types (~> 2.0)
net-http-digest_auth (~> 1.1, >= 1.1.1)
net-http-persistent (~> 2.5, >= 2.5.2)
nokogiri (~> 1.4)
ntlm-http (~> 0.1, >= 0.1.1)
webrobots (>= 0.0.9, < 0.2)
method_source (0.8.2)
mime-types (2.6.2)
mimemagic (0.3.0)
mini_portile (0.6.2)
minitest (5.8.1)
multi_json (1.11.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
mysql2 (0.3.20)
net-http-digest_auth (1.4)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.0.1)
netrc (0.10.3)
newrelic_rpm (3.14.0.305)
nilify_blanks (1.2.1)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
ntlm-http (0.1.1)
orm_adapter (0.5.0)
paper_trail (4.0.0)
activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0)
request_store (~> 1.1)
paperclip (4.3.1)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (= 0.3.0)
parallel (1.6.1)
parallel_tests (1.9.0)
parallel
pdf-reader (1.3.3)
Ascii85 (~> 1.0.0)
afm (~> 0.2.0)
hashery (~> 2.0)
ruby-rc4
ttfunk
pdfkit (0.8.2)
phaxio (0.4.0)
httmultiparty (~> 0.3.8)
prawn (0.12.0)
pdf-reader (>= 0.9.0)
ttfunk (~> 1.0.2)
premailer (1.8.6)
css_parser (>= 1.3.6)
htmlentities (>= 4.0.0)
protected_attributes (1.1.3)
activemodel (>= 4.0.1, < 5.0)
pry (0.10.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4)
rack-mini-profiler (0.9.7)
rack (>= 1.1.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.4)
actionmailer (= 4.2.4)
actionpack (= 4.2.4)
actionview (= 4.2.4)
activejob (= 4.2.4)
activemodel (= 4.2.4)
activerecord (= 4.2.4)
activesupport (= 4.2.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.4)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
rails-observers (0.1.2)
activemodel (~> 4.0)
railties (4.2.4)
actionpack (= 4.2.4)
activesupport (= 4.2.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rb-fchange (0.0.6)
ffi
rb-fsevent (0.9.6)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
rb-readline (0.4.2)
redis (3.2.1)
ref (2.0.0)
request_store (1.2.0)
responders (2.1.0)
railties (>= 4.2.0, < 5)
rest-client (1.8.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rmagick (2.13.2)
role_model (0.8.2)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-rails (3.3.3)
actionpack (>= 3.0, < 4.3)
activesupport (>= 3.0, < 4.3)
railties (>= 3.0, < 4.3)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-support (~> 3.3.0)
rspec-steps (2.0.1)
rspec (>= 3.0, < 3.99)
rspec-support (3.3.0)
ruby-rc4 (0.1.5)
ruby_gntp (0.3.4)
rubyzip (1.1.7)
sass (3.4.19)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
scoped_search (3.2.2)
activerecord (>= 3.2.0)
scrypt (2.0.2)
ffi-compiler (>= 0.0.2)
rake
selenium-webdriver (2.38.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (~> 1.0)
websocket (~> 1.0.4)
simple_form (3.2.0)
actionpack (~> 4.0)
activemodel (~> 4.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
slop (3.6.0)
sprockets (3.4.0)
rack (> 1, < 3)
sprockets-es6 (0.8.1)
babel-source (>= 5.8.11)
babel-transpiler
sprockets (>= 3.0.0)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sshkit (1.7.1)
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stripe (1.30.2)
json (~> 1.8.1)
rest-client (~> 1.4)
terminal-notifier-guard (1.6.4)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
timecop (0.8.0)
ttfunk (1.0.3)
twiliolib (2.0.7)
builder (>= 2.1.2)
twitter-bootstrap-rails (3.2.0)
actionpack (~> 4.1)
execjs (~> 2.2)
rails (~> 4.1)
railties (~> 4.1)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.1)
vcr (2.9.3)
warden (1.2.3)
rack (>= 1.0)
web-console (2.2.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
webrobots (0.1.1)
websocket (1.0.7)
will_paginate (3.0.7)
will_paginate-bootstrap (1.0.1)
will_paginate (>= 3.0.3)
wkhtmltopdf-binary (0.9.9.3)
xml-simple (1.1.5)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
aasm
actionpack-action_caching
actionpack-page_caching
activemerchant
activerecord-deprecated_finders
activerecord-session_store
acts_as_account
ar-octopus
authlogic
auto_strip_attributes (~> 2.0)
aws-sdk (< 2.0)
balanced
by_star!
cancancan (~> 1.10)
capistrano
capistrano-ext
capybara
capybara-mechanize
capybara-webkit
chronic
coffee-rails (~> 4.0.0)
database_cleaner
dbf
debugger2
devise
factory_girl_rails
fakeweb
forgery (= 0.5.0)
geocoder
georuby
growl
guard-rspec
highline
jquery-rails
jquery-ui-rails
less-rails (~> 2.7.0)
less-rails-fontawesome
listen (= 0.4.7)
lob
mail
mysql2 (~> 0.3.18)
net-ssh
newrelic_rpm
nilify_blanks
paper_trail
paperclip
parallel_tests
pdfkit
phaxio
prawn (= 0.12.0)
premailer
protected_attributes
rack-mini-profiler
rails (= 4.2.4)
rails-observers
rake
rb-fsevent
rb-readline (~> 0.4.2)
redis
responders (~> 2.0)
rmagick (= 2.13.2)
role_model
rspec-rails
rspec-steps
ruby_gntp
sass-rails
scoped_search
selenium-webdriver (~> 2.38.0)
simple_form
simplecov (~> 0.7.1)
sprockets (>= 3.0.0)
sprockets-es6
stripe
terminal-notifier-guard
therubyracer (~> 0.12.0)
timecop
twilio-rb!
twiliolib
twitter-bootstrap-rails
typhoeus
uglifier (~> 1.3.0)
vcr
web-console (~> 2.0)
will_paginate
will_paginate-bootstrap
wkhtmltopdf-binary
xml-simple
yajl-ruby
BUNDLED WITH
1.10.6
It does not show any error just not working properly, I don't know if it is Bootstrap, Less or SASS ? Any suggestions please ?
Thank you
#max sorry I have not a lot of experience with front-end and design.
Here is my application.css
/* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . *= require bootstrap_and_overrides *= require jquery.tooltip *= require overcast/overcast *= require admin *= require_directory . *= require jquery-ui *= require jquery-ui/datepicker *= stub application-print *= stub application-email */
I have the same problem described here:
How to call a Capistrano's task within another Capistrano's task?
However the workaround solution of rolling back to Capistrano v3.0.1 and sshkit 1.0 does not work for me.
Using this tutorial, I have declared custom tasks in lib/capistrano/tasks which use functions decalared in .rb files stored at lib/capistrano/
capfile:
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
require 'capistrano/rails'
require 'capistrano/rvm'
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
# Loads custom tasks from all folders below `lib/capistrano' if you have any defined.
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
# because the above didn't quite look right to me, and all the .rbs are in /lib/capistrano
Dir.glob('lib/capistrano/*.rb').each { |r| import r }
deploy.rb
set :application, 'hello-rails'
set :app_shortname, 'hr'
set :repo_url, 'git#bitbutcket.org:me/myapp.git' #<-substituted fake info here for this post
# Default value for :linked_files is []
set :linked_files, %w{config/database.yml config/application.yml}
# Default value for linked_dirs is []
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
# everything below this comment adapted from the talkingquickly tutorial
#which config files should be copied by deploy:setup_config
set(:config_files, %w(
nginx.conf
unicorn.rb
unicorn_init.sh
))
# which config files should be made executable after copying
# by deploy:setup_config
set(:executable_config_files, %w(unicorn_init.sh))
# files which need to be symlinked
set(:symlinks, [
{
source: "nginx.conf",
link: "/etc/nginx/sites-enabled/{{full_app_name}}"
},
{
source: "unicorn_init.sh",
link: "/etc/init.d/unicorn_{{full_app_name}}"
}
])
#specify my ruby version
set :rvm_type, :system
#specify my gemset
set :rvm_ruby_version, '1.9.3-p385#hello-rails'
namespace :deploy do
# make sure we're deploying what we think we're deploying
before :deploy, "deploy:check_revision"
# only allow a deploy with passing tests to deployed
before :deploy, "deploy:run_tests"
# compile assets locally then rsync
after 'deploy:symlink:shared', 'deploy:compile_assets_locally'
after :finishing, 'deploy:cleanup'
end
config/staging.rb
set :stage, :staging
set :branch, "cap-rails"
set :rails_env, :test
# used in case we're deploying multiple versions of the same
# app side by side. Also provides quick sanity checks when looking
# at filepaths
set :full_app_name, "#{fetch(:app_shortname)}_#{fetch(:stage)}"
set :deploy_to, "/srv/#{fetch(:app_shortname)}"
# number of unicorn workers
set :unicorn_worker_count, 5
# For building nginx config file
set :enable_ssl, false
# extended properties on the server.
server 'dev', user: 'deployer', roles: %w{web app} #<-substituted fake info here for this post
# custom ssh options
set :ssh_options, {
user: 'deployer', #<-substituted fake info here for this post
keys: %w(path.to.key), #<-substituted fake info here for this post
forward_agent: true,
auth_methods: %w(publickey)
}
lib/capistrano/tasks/setup_config.cap
namespace :deploy do
task :setup_config do
on roles(:app) do
# make the config dir
execute :mkdir, "-p #{shared_path}/config"
full_app_name = fetch(:full_app_name)
# config files to be uploaded to shared/config, see the
# definition of smart_template for details of operation.
# Essentially looks for #{filename}.erb in deploy/#{full_app_name}/
# and if it isn't there, falls back to deploy/#{shared}. Generally
# everything should be in deploy/shared with params which differ
# set in the stage files
config_files = fetch(:config_files)
config_files.each do |file|
smart_template file
end
# which of the above files should be marked as executable
executable_files = fetch(:executable_config_files)
executable_files.each do |file|
execute :chmod, "+x #{shared_path}/config/#{file}"
end
# symlink stuff which should be... symlinked
symlinks = fetch(:symlinks)
symlinks.each do |symlink|
sudo "ln -nfs #{shared_path}/config/#{symlink[:source]} #{sub_strings(symlink[:link])}"
end
end
end
end
lib/capistrano/template.rb
def smart_template(from, to=nil)
to ||= from
full_to_path = "#{shared_path}/config/#{to}"
if from_erb_path = template_file(from)
from_erb = StringIO.new(ERB.new(File.read(from_erb_path)).result(binding))
upload! from_erb, full_to_path
info "copying: #{from_erb} to: #{full_to_path}"
else
error "error #{from} not found"
end
end
def template_file(name)
if File.exist?((file = "config/deploy/#{fetch(:full_app_name)}/#{name}.erb"))
return file
elsif File.exist?((file = "config/deploy/shared/#{name}.erb"))
return file
end
return nil
end
Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.4'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.2'
# 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'
# 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', '~> 1.2'
#because sshkit 1.3 has this bug: https://stackoverflow.com/questions/21401665/how-to-call-a-capistranos-task-within-another-capistranos-task
gem 'sshkit', '~> 1.0.0'
gem 'capistrano', '~> 3.0.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rvm'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.4)
actionpack (= 4.0.4)
mail (~> 2.5.4)
actionpack (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
activerecord (4.0.4)
activemodel (= 4.0.4)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.4)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.4)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
atomic (1.1.16)
builder (3.1.4)
capistrano (3.0.1)
i18n
rake (>= 10.0.0)
sshkit (>= 0.0.23)
capistrano-bundler (1.0.0)
capistrano (>= 3.0.0.pre)
capistrano-rails (1.1.0)
capistrano (>= 3.0.0)
capistrano-bundler (>= 1.0.0)
capistrano-rvm (0.0.3)
capistrano
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
erubis (2.7.0)
execjs (2.0.2)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
multi_json (1.9.2)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.8.0)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.4)
actionmailer (= 4.0.4)
actionpack (= 4.0.4)
activerecord (= 4.0.4)
activesupport (= 4.0.4)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.4)
sprockets-rails (~> 2.0.0)
railties (4.0.4)
actionpack (= 4.0.4)
activesupport (= 4.0.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.2.2)
rdoc (4.1.1)
json (~> 1.4)
sass (3.2.18)
sass-rails (4.0.2)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0.0)
sdoc (0.4.0)
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
sshkit (1.0.0)
net-scp
net-ssh
term-ansicolor
term-ansicolor (1.3.0)
tins (~> 1.0)
thor (0.19.1)
thread_safe (0.3.1)
atomic (>= 1.1.7, < 2)
tilt (1.4.1)
tins (1.0.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.1)
coffee-rails
tzinfo (0.3.39)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
PLATFORMS
ruby
DEPENDENCIES
capistrano (~> 3.0.1)
capistrano-rails (~> 1.1)
capistrano-rvm
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
rails (= 4.0.4)
sass-rails (~> 4.0.2)
sdoc
sqlite3
sshkit (~> 1.0.0)
turbolinks
uglifier (>= 1.3.0)
When I execute
bundle exec cap staging deploy:setup_config
I get this output:
INFO [9e71d728] Running mkdir -p /srv/hr/shared/config on ruby-dev
DEBUG [9e71d728] Command: mkdir -p /srv/hr/shared/config
INFO [9e71d728] Finished in 0.738 seconds command successful.
cap aborted!
NoMethodError: undefined method `smart_template' for #<SSHKit::Backend::Netssh:0x007f8a4dc04980>
/Users/nico/DevOps/repo/hello-rails/lib/capistrano/tasks/setup_config.cap:16:in `block (4 levels) in <top (required)>'
/Users/nico/DevOps/repo/hello-rails/lib/capistrano/tasks/setup_config.cap:15:in `each'
/Users/nico/DevOps/repo/hello-rails/lib/capistrano/tasks/setup_config.cap:15:in `block (3 levels) in <top (required)>'
/Users/nico/.rvm/gems/ruby-1.9.3-p385#hello-rails-cap-v3-sshkit-v1/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:42:in `instance_exec'
/Users/nico/.rvm/gems/ruby-1.9.3-p385#hello-rails-cap-v3-sshkit-v1/gems/sshkit-1.0.0/lib/sshkit/backends/netssh.rb:42:in `run'
It appears that using capistrano v3.0.1 and sshkit v1.0 are not resolving my issue. The deploy:setup_config task is attempting to call the function smart_template as defined in lib/capistrano/template.rb, and the output indicates that the function cannot be found. I'm at a loss for how to get this working properly. Any advise on addressing the issue is welcome. Also, if a better approach to creating the config and executable files for nginx and unicorn exists I'd love to hear about that.
EDIT
After suspecting that the sshkit gem from rubygems still containing the bug, I added
gem 'sshkit', :git => 'https://github.com/capistrano/sshkit.git'
to my Capfile and rebuilt my local gemset. This didn't address the issue, however, and directed me to look elsewhere. From there I was able to diagnose the issue as being related to the import of the ruby files defined by these lines in my Capfile:
Dir.glob('lib/capistrano/*.rb').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
I commented the lines out and replaced them with:
require_relative 'lib/capistrano/template.rb'
require_relative 'lib/capistrano/substitute_strings.rb'
and the functions are now called properly by my deploy:setup_config task. I exported the working gem set and created a new gemset using sshkit from ruby gems. With the require_relative lines listed above, the sshkit gem from rubygems worked fine. So the issue was never with the bug in sshkit, regardless of which source I was using (git or rubygems), but with the imports of the ruby files containing the functions that my cap task was calling.
There are two problems with your example, the correct lines are:
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
You can see the complete example here
Per my edit in the original question, the source of the sshkit gem was not my issue.
Rather, the issue was with the import statements.
Changing the lines:
# Loads custom tasks from all folders below `lib/capistrano' if you have any defined.
Dir.glob('lib/capistrano/*.rb').each { |r| import r }
Dir.glob('lib/capistrano/**/*.rb').each { |r| import r }
to:
require_relative 'lib/capistrano/template.rb'
require_relative 'lib/capistrano/substitute_strings.rb'
addressed the issue for me.
I'm not sure why the Dir.glob method didn't work for me, I assume operator error with the expectation that figuring out what I did wrong will be useful for generalizing imports in future cap deployments.
I'm trying to deploy a Rails 3.1 application for the first time on Heroku. I set it to the Cedar stack, removed the sqlite3 gem but when I push the code to Heroku I get this error:
-----> Installing dependencies using Bundler version 1.1.rc
Running: bundle install --without development:test --path vendor/bundle --deployment
Fetching gem metadata from http://rubygems.org/....... (...)
Installing rails (3.1.0)
Installing sqlite3 (1.3.4) with native extensions Unfortunately, a fatal error has occurred. Please report this error to
the Bundler issue tracker at
https://github.com/carlhuda/bundler/issues so that we can fix it.
Thanks!
/usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native
extension. (Gem::Installer::ExtensionBuildError)
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
I've no idea why bundle install is trying to install sqlite3. Take a look at my Gemfile and Gemfile.lock:
Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'json'
gem 'pg'
gem 'thin'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
# gem 'sass-rails', " ~> 3.1.0"
# gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
Gemfile.lock
GEM remote: http://rubygems.org/ specs:
actionmailer (3.1.0)
actionpack (= 3.1.0)
mail (~> 2.3.0)
actionpack (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.2)
rack-cache (~> 1.0.3)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.0)
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activeresource (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activesupport (3.1.0)
multi_json (~> 1.0)
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
daemons (1.1.4)
erubis (2.7.0)
eventmachine (0.12.10)
execjs (1.2.9)
multi_json (~> 1.0)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.14)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.1)
mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
pg (0.11.0)
polyglot (0.3.2)
rack (1.3.3)
rack-cache (1.0.3)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.1.0)
actionmailer (= 3.1.0)
actionpack (= 3.1.0)
activerecord (= 3.1.0)
activeresource (= 3.1.0)
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2)
rdoc (3.9.4)
sprockets (2.0.0)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thin (1.2.11)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.29)
uglifier (1.0.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
PLATFORMS ruby
DEPENDENCIES jquery-rails json pg rails (= 3.1.0) thin uglifier
How can I fix it?
When I ran into the problem, turns out I'd forgotten to commit my changes after bundle install. Doh! git status should indicate unstaged changes for the gem files.
I has the same problem and zoltarSpeaks' solution fixed it for me. I had the taps gem installed after reading this article that indicated it would be necessary for pushing from a local sqlite3 to production postgresql: http://batsov.com/articles/2011/10/30/deploying-rails31-apps-on-celadon-cedar/. Turned out I didn't need the taps gem after all, but it was clearly the problem. Removed the reference, bundle update, all systems go.
try deleting Gemfile.lock and run Bundle Install, commit and push
Simple solution without uninstalling sqlite3 gem for Heroku:
Add to Gemfile:
group :production do
gem 'pg', '0.17.1' #or version of pg you want
gem 'rails_12factor', '0.0.2' #Heroku static assets for image and css
Check, that you have:
end
end
at the end of code in Gemfile
than Save Gemfile and run bundle install
$ bundle install --without production
than commit
$ git commit -a -m "Update Gemfile.lock for Heroku"
than
$ git push heroku master
That is all. You will get only a few warnings which is simply to fix.