Closed sammdec closed 11 years ago
I am pretty sure this is a bug related to ruby 1.9.3-p392 and some librairies.
I run assetpack with 1.9.3-p392 without issue and already saw this enumerator segfault issue with other libs. Try removing some gems or downgrading to an other ruby version.
If you a the specific issue I'll sure fix it, but otherwise I think its not a problem with sinatra-assetpack.
It seems to only kick in though when I start to use Assetpack if I work without I dont get the crash. Would it be advaisable to upgrade to ruby 2.0
Should work too on ruby 2.0.0, haven't used in on 2.0 in production but tests are run with success :
https://travis-ci.org/rstacruz/sinatra-assetpack/jobs/5750132
Otherwise downgrade to ruby-1.9.3-p385
I tried it with ruby 2.0.0 and while when I running it for the first time it seems to work fine and then as soon as I try and restart the server it hangs and I have to kill the process to be able to get the app running again.
Now If i try to run the app again at all with the erb tags <%= css :application %>
in the template it will crash the app and I have to restart do you know of any gems that will conflict with asset pack.
Here is my gemfile:
gem "sinatra"
gem "sinatra-contrib"
gem "sinatra-flash"
gem "dm-mysql-adapter"
gem "data_mapper"
gem "omniauth-twitter"
gem "omniauth"
gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
Could it be because Im using a classic style app so Im not subclassing from sinatra base just doing require 'sinatra/assetpack'
then
assets do
serve '/js', from: 'assets/js' # Optional
serve '/css', from: 'assets/css' # Optional
serve '/images', from: 'assets/img' # Optional
# The second parameter defines where the compressed version will be served.
# (Note: that parameter is optional, AssetPack will figure it out.)
js :app, '/js/app.js', [
'/js/vendor/**/*.js',
'/js/app/**/*.js'
]
css :application, '/css/app.css', [
'/css/*.css'
]
end
Solved, it was my own stupid fault. I had a file called app.css but was also trying to serve up the compressed version as app.css it seemed to throw it into an infinite loop or something.
I have written a small app and have juts go round to implementing assetpack unfortunately it seems to crash the app when I try and call a page.
My setup is as follows: file: app.rb
file: assets.rb
folder structure:
Now when I run
ruby app.rb
the app starts properly but as soon as I refresh a page the app hangs and I get this output from the terminal