Displaying 5 results from an estimated 5 matches for "on_load".
2013 Feb 27
4
My SCSS compiled CSS lacks "/assets" in the generated urls
Running "rake assets:clobber assets:precompile" will generate files like
"application-xxx.css" with incorrect urls after upgrading to Rails 4.
For example url(/fields/xxx.png) when it should be
url(/assets/fields/xxx.png). For some unknown reason it worked once in
development mode, but after running rake assets:clobber I can''t get it
to work again...
Any ideas
2012 Jan 23
0
Problem loading modules through ActiveSupport on_load
...(options = {})
send :include, InstanceMethods
end
end
module InstanceMethods
# methods ...
end
end
end
**# config/application.rb**
config.autoload_paths += %W(#{config.root}/lib)
**# config/environment.rb**
ActiveSupport.on_load(:active_record) do
include History::Model
end
This works, the methods are mixed into the models.
In a similar way, I wanted to package another set of methods with a
different purpose in the same application and I followed the same
approach:
**# lib/history.rb**
module Fleet...
2014 Feb 17
0
Need help -FATAL: database "catarse_development" does not exist
.../active_support/lazy_load_hooks.rb:38:in
`instance_eval'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in
`execute_hook'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:28:in
`block in on_load'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:in
`each'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:in
`on_load'
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0....
2010 Nov 12
0
wrong number of arguments (0 for 1) (ArgumentError)
...azy_load_hooks.rb:36:in
`instance_eval''
from
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:36:in
`execute_hook''
from
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.0/lib/active_support/lazy_load_hooks.rb:26:in
`on_load''
from
C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.0/lib/action_controller/railtie.rb:52:in
`block in <class:Railtie>''
from
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.0/lib/rails/initializable.rb:25:in
`instance_exec''
from
C:/Ruby...
2012 Feb 20
0
Cannot start rails server: Please install the adapter: `gem install activerecord--adapter`
....1/lib/active_support/lazy_load_hooks.rb:36:in
`instance_eval''
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in
`execute_hook''
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:26:in
`on_load''
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/railtie.rb:74:in
`block in <class:Railtie>''
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in
`instance_exec''
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3...