diff --git a/app.rb b/app.rb index 8cc6034c..b07a0bf9 100644 --- a/app.rb +++ b/app.rb @@ -2,7 +2,7 @@ require 'json' -Bundler.require( :default, :development ) # require tout les gems définis dans Gemfile +Bundler.require( :default, ENV[ 'RACK_ENV' ].to_sym ) # require tout les gems définis dans Gemfile require_relative './lib/ledger' diff --git a/config.ru b/config.ru index 340f8d25..198e9116 100644 --- a/config.ru +++ b/config.ru @@ -1,11 +1,13 @@ # encoding: utf-8 +require_relative 'config/options' require_relative './app' configure :development do Sinatra::Application.reset! use Rack::Reloader end + use Rack::Rewrite do rewrite %r{^/(.*(css|js|ttf|woff|html|png|jpg|jpeg|gif)$)}, '/app/$1' end diff --git a/config/options.rb b/config/options.rb new file mode 100644 index 00000000..5b66c4ea --- /dev/null +++ b/config/options.rb @@ -0,0 +1,3 @@ +# encoding: utf-8 + +ENV[ 'RACK_ENV' ] = 'development'