Giter Site home page Giter Site logo

active_reload's People

Contributors

hubertlepicki avatar jaimeiniesta avatar nixme avatar paneq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

active_reload's Issues

Invalid Gemspec

Getting this error every time the project is loaded (and all the gems):
Invalid gemspec in [/Users/tanel/.rvm/gems/ruby-1.9.2-p180@project/specifications/active_reload-0.2.0.gemspec]: invalid date format in specification: "2011-07-20 00:00:00.000000000Z"

The gemspec itself looks like this at that location:

-- encoding: utf-8 --

Gem::Specification.new do |s|
s.name = %q{active_reload}
s.version = "0.2.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Robert Pankowecki"]
s.date = %q{2011-07-20 00:00:00.000000000Z}
s.description = %q{Reload Rails code in development mode only when change is deteced}
s.email = ["[email protected]"]
s.homepage = %q{https://github.com/paneq/active_reload}
s.require_paths = ["lib"]
s.rubyforge_project = %q{active_reload}
s.rubygems_version = %q{1.7.2}
s.summary = %q{Reload Rails code in development mode only when change is deteced}

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
  s.add_development_dependency(%q<rake>, [">= 0"])
  s.add_development_dependency(%q<bbq>, [">= 0"])
else
  s.add_dependency(%q<rake>, [">= 0"])
  s.add_dependency(%q<bbq>, [">= 0"])
end

else
s.add_dependency(%q, [">= 0"])
s.add_dependency(%q, [">= 0"])
end
end

The date clearly is in the wrong format, but the gemspec does not resemble the one in your repository.
Do you use something else to generate the gemspec before releasing?

incompatible with rails 3.2

When migrating an old rails 3.1.x app to rails 3.2.0 assets are no longer served when active_reload is in the Gemfile (404 not found). This can easily by reproduced by creating a brand new 3.2 rails app and adding active_reload to the Gemfile.

As active_reload is not needed for rails 3.2 anymore, I'd suggest to put a big warning in the README making users aware of this bug/ problem. See this issues here too: rails/rails#2715

Problem with locales

Hello, I have trouble with active_reload.

I've set locale from a query:

class ApplicationController < ActionController::Base
  before_filter :set_locale

  def set_locale
    I18n.locale = params[:locale] || I18n.default_locale
    logger.debug "Current locale: #{I18n.locale}"
  end
end

Default locale is:
config.i18n.default_locale = :en

And then I make 2 GET queries:

First query:
Started GET "/en" for 127.0.0.1 at 2011-07-26 21:20:39 +0600
Processing by PostsController#index as HTML
Parameters: {"locale"=>"en"}
Current locale: en
SQL (0.3ms) SHOW TABLES
Post Load (0.1ms) SELECT posts.* FROM posts WHERE posts.locale = 'en' AND (posts.deleted_at IS NULL) ORDER BY created_at DESC LIMIT 2 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) FROM posts WHERE posts.locale = 'en' AND (posts.deleted_at IS NULL)

Second query:
Started GET "/ru" for 127.0.0.1 at 2011-07-26 21:20:44 +0600
Processing by PostsController#index as HTML
Parameters: {"locale"=>"ru"}
Current locale: ru
Post Load (0.1ms) SELECT posts.* FROM posts WHERE posts.locale = 'en' AND (posts.deleted_at IS NULL) ORDER BY created_at DESC LIMIT 2 OFFSET 0
SQL (0.1ms) SELECT COUNT(*) FROM posts WHERE posts.locale = 'en' AND (posts.deleted_at IS NULL)

As you can see in second GET query we have "ru" locale in params, but for AR query we got "en"! When I removed active_reload from Gemfile then all became working!

Rails 3.0.9 + Ubuntu 10.10

Missing licensing information

Could you please indicate under which license this code is released? As far as I could tell this currently isn't mentioned.

Null exception Rails 3.1.rc4/Ruby 1.9.2-p290

Getting following error:

/Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/active_reload-0.1.0/lib/active_reload.rb:12:in replace?': You have a nil object when you didn't expect it! (NoMethodError) You might have expected an instance of Array. The error occurred while evaluating nil.last from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/active_reload-0.1.0/lib/active_reload.rb:22:inreplace!'
from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/active_reload-0.1.0/lib/active_reload.rb:7:in block in <class:Railtie>' from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:25:ininstance_exec'
from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:25:in run' from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:50:inblock in run_initializers'
from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:49:in each' from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/initializable.rb:49:inrun_initializers'
from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/application.rb:96:in initialize!' from /Users/heli/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0.rc4/lib/rails/railtie/configurable.rb:30:inmethod_missing'

Add support for ruby 1.8.7 (undefined method `source_location' for Proc)

After gem installation, when the server starts I received:

/home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/active_reload-0.1.0/lib/active_reload.rb:18:in `replace_proc?': undefined method `source_location' for #<Proc:0xb5d97064> (NoMethodError)
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/active_reload-0.1.0/lib/active_reload.rb:12:in `replace?'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/active_reload-0.1.0/lib/active_reload.rb:22:in `replace!'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/active_reload-0.1.0/lib/active_reload.rb:7
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `instance_exec'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/initializable.rb:25:in `run'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/initializable.rb:50:in `run_initializers'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `each'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/initializable.rb:49:in `run_initializers'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/application.rb:134:in `initialize!'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/application.rb:77:in `send'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/railties-3.0.5/lib/rails/application.rb:77:in `method_missing'
    from /home/leszek/lingapp/config/environment.rb:4
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /home/leszek/lingapp/config.ru:2
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
    from /home/leszek/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
    from /home/leszek/lingapp/config.ru:1:in `new'
    from /home/leszek/lingapp/config.ru:1

Clear cache for assets too?

Seems that changes to e.g. stylesheets are not being refreshed, Rails 3.1rc6 and not using sprockets yet (just static files in /public/stylesheets etc.)

Great gem if all of these things work. Should have been part of Rails from day one.

Error message on load

/home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/active_reload-0.2.0/lib/active_reload.rb:34:in replace_proc?': undefined methodsource_location' for #Proc:0xc9fde0c (NoMethodError)
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/active_reload-0.2.0/lib/active_reload.rb:12:in replace?' from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/active_reload-0.2.0/lib/active_reload.rb:38:inreplace!'
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/active_reload-0.2.0/lib/active_reload.rb:7
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/initializable.rb:25:in instance_exec' from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/initializable.rb:25:inrun'
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/initializable.rb:50:in run_initializers' from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/initializable.rb:49:ineach'
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/initializable.rb:49:in run_initializers' from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/application.rb:134:ininitialize!'
from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/application.rb:77:in send' from /home/tim/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.0.5/lib/rails/application.rb:77:inmethod_missing'

activeadmin

active_reload doesn't work with activeadmin, the menu is not rendered anymore after the first request

prepare called even when not cleaned

I had following issue with Spree 0.70.3:

spree_promo has to_prepare call, which calls alias_method_chain
when code wasn't reloaded - to_prepare call was called and creating another alias_method_chain
resulting in infinite recursion

I made simples working solution for Rails 3.1. From what I saw it shouldn't be hard to get it working in Rails 3.0.

This multi to_prepare loading without proper cleaning can result in weird errors... I spent almost 7 hours tracking it down.

Here is my solution - https://gist.github.com/1440449

Feel free to use it if you want.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.