group :development, :test do
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
end
$bundle
add better_errors.rb in /config/initializers then add bellow code:
if defined? BetterErrors
BetterErrors.editor = proc { |full_path, line|
full_path = full_path.sub(Rails.root.to_s, "/home/saritha/sites/testproj")
"subl://open?url=file://#{full_path}&line=#{line}"
}
end
To handle with firefox:
1. First of all download and install sublime url handler patch to handle the url with line number. Download sublime-url-handler.
from https://github.com/algorich/sublime-url-handler/archive/master.zip
2. Goto to development.rb file and add BetterErrors.editor = :sublime
3. Goto firefox and type about:config in url and hit enter
4. Right click and create new property with boolean type with name " network.protocol-handler.expose.subl" set "False".
5. Restart Firefox.
6. Run your rails app and get the error link page, click on error link it will ask open open with if sublime-url-hanlder is shown here well done choose and cheers if not shown than give your sublime executable path here and done.
you can add https://chrome.google.com/webstore/detail/railspanel/gjpfobpafnhjhbajcjgccbbdofdckggg to chrome..this will help in detail work flow..
No comments:
Post a Comment