Git Product home page Git Product logo

rails-dev-tweaks's People

Contributors

aaronjensen avatar mjtko avatar nevir avatar nixterrimus 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rails-dev-tweaks's Issues

LoadError on models in sub directories

We have a model in a subdirectory

/app/models/fa/base.rb

Defined like so

class FA::Base < ActiveResource::Base
  #code
end

We just upgraded from 3.0.9 -> 3.1.2. The app works in 3.1.2. I added this to our Gemfile

gem 'rails-dev-tweaks', '~> 0.6.1'

And then our app crashed on the first page load with

LoadError
Expected /Users/gary/dev/artful.ly/app/models/fa/base.rb to define Base

When we changed the class declaration to

class Base < ActiveResource::Base

Rails crashed with

ruby-1.9.2-p290/gems/activesupport-3.1.2/lib/active_support/dependencies.rb:490:in `load_missing_constant': Expected /Users/gary/dev/artful.ly/app/models/fa/base.rb to define FA::Base (LoadError)

Which was expected

Our autoload paths are:

config.autoload_paths += %W(#{config.root}/lib)
config.autoload_paths += Dir["#{config.root}/lib/**/"]
config.autoload_paths += Dir["#{Rails.root.to_s}/app/models/**/"]

I've been reading about autoload issues between 3.0 and 3.1, but again this app runs without rails-dev-tweaks installed. Something is amiss somewhere. I haven't dove into the rails-dev-tweaks code yet but I'm about to get going on it.

I tried this with 0.6.0 and 0.5.2

Using Ruby 1.9.2

Let me know what other info will help diagnose. Thanks!

Did not speed up anything

Did I miss anything? I have not a percent more speed achieved. I did some comparements and it got even slower on average (200 - 300 ms). Using the latest thin-server. Thanks!

Rails 4 support

I tried to upgrade my app to Rails 4.0.0.rc1, but bundling breaks on rails-dev-tweaks:

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails-dev-tweaks (>= 0) ruby depends on
      rails (~> 3.1.0.rc4) ruby

    rails (4.0.0.rc1)

Could you look into updating the gem to make it work with Rails 4? (Or is it not needed anymore with Rails 4?)

Add License information to Gemspec

This will make it show up on rubygems.org. I'm doing due diligence on our gems and need to find out the licenses for all the gems. Having it show up on rubygems.org cuts out the step of having to go to the github repo.

:locale param from routing-filter lost

With routing-filter (v0.3.1) and rails-dev-tweaks (0.6.1) both enabled, and using filter :locale in routes.rb, the locale param is lost (ie. if params is dumped out it won't contain a locale key). params[:locale] is properly set if rails-dev-tweaks is disabled.

Pages stopped displaying in browser with Rails 4.2 + rails-dev-tweaks 1.1

I am in the process of upgrading our app to Rails 4.2 from 3.2. After getting gem dependencies taken care of, I started the server and began trying to open various static pages. I noticed that, even with a 200 Completed message in the server console, the pages were not loading the browser. The screen just remained white and the "activity" indicator in the tab would spin endlessly. There were no errors in the JS console.

Sometimes this process in the browser never ended, sometimes the page finally loaded but was missing certain assets, other times it finally displayed but still just took a really long time.

After trying a lot of configuration changes in development.rb and application.rb I decided to just start commenting gems out of the Gemfile. I started with the development group since it seemed like the most likely place. Upon completely commenting out that group, the problem went away. So I chose "rails-dev-tweaks" by itself since it seemed like something that might touch asset loading, etc, and when I uncommented that one the problem immediately reoccurred.

Sorry that my technical skill isn't good enough to comment more on this. It just seems like I have this problem only when the gem is active. Any suggestions?

Rails 4.2
rails-dev-tweaks 1.1.0

Rails server won't start when using gem

After adding gem 'rails-dev-tweaks', '0.5.0' to the development group in the Gemfile, I get the following error and stacktrace when starting the Rails server

NoMethodError (undefined method `call' for nil:NilClass):

activesupport (3.1.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
routing-filter (0.2.4) lib/routing_filter/adapters/rails_3.rb:74:in `recognize_with_filtering'
rails-dev-tweaks (0.5.0) lib/rails_dev_tweaks/granular_autoload/matchers/asset_matcher.rb:4:in `call'
rails-dev-tweaks (0.5.0) lib/rails_dev_tweaks/configuration.rb:72:in `block in should_reload?'
rails-dev-tweaks (0.5.0) lib/rails_dev_tweaks/configuration.rb:71:in `each'
rails-dev-tweaks (0.5.0) lib/rails_dev_tweaks/configuration.rb:71:in `should_reload?'
rails-dev-tweaks (0.5.0) lib/rails_dev_tweaks/granular_autoload/middleware.rb:21:in `call'
rack (1.3.2) lib/rack/sendfile.rb:101:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.1.0) lib/rails/rack/logger.rb:13:in `call'
rack (1.3.2) lib/rack/methodoverride.rb:24:in `call'
rack (1.3.2) lib/rack/runtime.rb:17:in `call'
activesupport (3.1.0) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.3.2) lib/rack/lock.rb:15:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/static.rb:53:in `call'
dragonfly (0.9.5) lib/dragonfly/cookie_monster.rb:9:in `call'
dragonfly (0.9.5) lib/dragonfly/middleware.rb:13:in `call'
rack-cache (1.0.3) lib/rack/cache/context.rb:132:in `forward'
rack-cache (1.0.3) lib/rack/cache/context.rb:243:in `fetch'
rack-cache (1.0.3) lib/rack/cache/context.rb:181:in `lookup'
rack-cache (1.0.3) lib/rack/cache/context.rb:65:in `call!'
rack-cache (1.0.3) lib/rack/cache/context.rb:50:in `call'
railties (3.1.0) lib/rails/engine.rb:455:in `call'
railties (3.1.0) lib/rails/railtie/configurable.rb:30:in `method_missing'
rack (1.3.2) lib/rack/urlmap.rb:52:in `block in call'
rack (1.3.2) lib/rack/urlmap.rb:46:in `each'
rack (1.3.2) lib/rack/urlmap.rb:46:in `call'
rack (1.3.2) lib/rack/showexceptions.rb:24:in `call'
railties (3.1.0) lib/rails/rack/content_length.rb:16:in `call'
railties (3.1.0) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.3.2) lib/rack/handler/webrick.rb:59:in `service'
/Users/watson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/watson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/watson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

Doesn't work with Rails 4.1

Hi,

This Gem worked very well for me on Rails 4.0. Thanks for making it! Unfortunately it doesn't on 4.1:

irb(main):001:0> Rails.application.class.method_defined?(:reload_dependencies?)
=> false

This means that RailsDevTweaks::GranularAutoload::Middleware.reload_dependencies? always returns true, which makes this gem pretty much unusable with 4.1 because any savings gained from not reloading assets are negated by the overhead of always reloading classes even when nothing has changed.

Can I suggest to declare incompatibility with Rails 4.1 in the gemspec?

Push 1.2 to rubygems

The pull request #9 you merged makes a huge difference to this gem. It takes it from an average improvement to an excellent improvement. Please push what is latest on github to rubygems. If you need maintainers for this gem I'm more than happy to do it.

Failure (with Mongoid?)

via rails/sass-rails#5 (comment)

Started GET "/assets/icons/ajax-loader.gif" for 127.0.0.1 at 2011-07-12 13:43:15 +0800
RailsDevTweaks: Skipping ActionDispatch::Reloader middleware for this request.
Served asset /icons/ajax-loader.gif - 304 Not Modified (1ms) (pid 16956)

Started GET "/admin/countries" for 127.0.0.1 at 2011-07-12 13:43:21 +0800
Processing by Admin::CountriesController#index as HTML
MONGODB w2d_asia_development['users'].find({:_id=>BSON::ObjectId('4e13e3499a4b7c395b000001')})
Completed 500 Internal Server Error in 355ms

NoMethodError (undefined method `to_sym' for nil:NilClass):

Full stack: https://gist.github.com/1077536

New gem

Can you please publish a new gem for the latest 1.x version? Thanks.

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.