johnbintz / guard-rails Goto Github PK
View Code? Open in Web Editor NEWNo longer maintained. Latest version is at https://github.com/ranmocy/guard-rails
No longer maintained. Latest version is at https://github.com/ranmocy/guard-rails
Just a thought while I was editing some small locale changes that reloading the whole of rails might be overkill for lazy loadable locale changes.
lsof -P | grep "*:#{port} " will do it on Mac OS X. Have a new guard option, :force_run
, that tried to kill the associated PID if it's found.
Hi John,
Just thinking that the rails server should be started and restarted on guard's reload command rather than run_all?
This would mean when you reload guard with r+enter it will restart the server, but just hitting enter will not do anything.
What do you think?
For me that makes sense if I also run rspec and cucumber in my guardfile, so enter runs all the tests, and r+enter reloads the server and spork.
How would one use bundle exec before the server command?
When I put this code in a Guardfile
Rails.root.join('spec/javascripts'),
It occurs error uninitialized constant Guard::Dsl::Rails.
Is any other way to point the root directory?
All of a sudden (after upgrading guard-rails) to latest version we get the following errors
Started GET "/" for 127.0.0.1 at 2013-02-25 11:25:13 +0100
Processing by PagesController#show as HTML
Site Load (0.3ms) SELECT "sites".* FROM "sites" WHERE "sites"."subdomain" = 'dev' LIMIT 1
Page Load (0.3ms) SELECT "pages".* FROM "pages" WHERE "pages"."site_id" = 1 AND "pages"."url" = '' LIMIT 1
Version Load (0.4ms) SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = 1 AND "versions"."item_type" = 'Page' AND "versions"."published_at" = '2013-02-21 17:30:23.241998' ORDER BY created_at ASC, id ASC LIMIT 1
Completed 500 Internal Server Error in 6ms
NoMethodError (protected method `[]' called for "":Version):
app/models/concerns/versionable.rb:69:in `published_version'
app/controllers/pages_controller.rb:9:in `show'
app/controllers/application_controller.rb:172:in `set_logger_site_id'
app/controllers/application_controller.rb:178:in `set_logger_username'
It'd be nice if you could have an option to suppress server log output and just tail the development log in another terminal session.
As in topic, debugger do not work properly with guard, it means it stops for a short while and then render rest of website, so you can not type anything in debugger.
Some info:
Used:
Is there any chance to make a release from the current commits in the master? I would sure like some of them, like the one with SIGINT, it's taking 30 seconds for my server to restart.
Guard::Rails will now restart your app on port 3000 using thin and development environment.
=> Booting Thin
=> Rails 3.2.6 application starting in test on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Thin web server (v1.4.1 codename Chromeo)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
my guard-rails configuration:
guard 'rails', :environment => :development, :port => 3000, :server => :thin do
watch('Gemfile.lock')
watch(%r{^(config|lib)/.*})
end
will this be possible?
This guard does currently not work with mountable engines due to the lack of rails s
in the engine root. It should detect that its being run in a mountable engine and use test/dummy/script/rails s
instead.
When the server is restarted via guard-rails, the specs fail with the following error:
Running: spec/routing spec/controllers/kong/clients_controller_spec.rb
/Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load': cannot load such file -- /Users/aziz/Sandbox/ruby/rails/agile_baboon/spec/routing (LoadError)
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `map'
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load_spec_files'
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in `run'
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
from /Users/aziz/.rvm/gems/ruby-1.9.3-p194@rails_agile_baboon/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'
This is really about about guard/guard-rails
There are depreciation warnings about run_on_change. I noticed you already updated this gem (johnbintz/guard-rails); can you update the guard/guard-rails gem as well? I couldn't submit an issue there. Is that gem unsupported now?
DEPRECATION: Starting with Guard v1.1 the use of the 'run_on_change' method in the 'Guard::Rails' guard is deprecated.
Please consider replacing that method-call with 'run_on_changes' if the type of change
is not important for your usecase or using either 'run_on_modifications' or 'run_on_additions'
based on the type of the changes you want to handle.
For more information on how to update existing guards, please head over to:
https://github.com/guard/guard/wiki/Upgrade-guide-for-existing-guards-to-Guard-v1.1
For now, have it always return true
.
What is an usual way to run apps using foreman ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.