Command Line
pry -r ./config/app_init_file.rb- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb- load your rails into a pry session
Debugger
| # Also @see https://www.viget.com/articles/protip-passing-parameters-to-your-rake-tasks for | |
| # examples using dependents and default values for arguments (see the updates at the end) | |
| # Avdi Grimm's rake tutorial is really helpful. His section on FileLists: | |
| # @see http://www.virtuouscode.com/2014/04/22/rake-part-2-file-lists/ | |
| # Rails: | |
| # * to get access to Rails models, etc, your task must depend on the :environment task | |
| # ex: task :my_task => :environment do .... |
| require "open-uri" | |
| require "net/http" | |
| Error = Class.new(StandardError) | |
| DOWNLOAD_ERRORS = [ | |
| SocketError, | |
| OpenURI::HTTPError, | |
| RuntimeError, | |
| URI::InvalidURIError, |
| brew tap homebrew/versions | |
| brew install v8-315 | |
| gem install libv8 -v '3.16.14.13' -- --with-system-v8 | |
| gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315 | |
| bundle install |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| class HelloWorldController < AbstractController::Base | |
| include AbstractController::Rendering | |
| include AbstractController::Layouts | |
| include AbstractController::Helpers | |
| include AbstractController::Translation | |
| include AbstractController::AssetPaths | |
| include ActionController::UrlWriter | |
| # Uncomment if you want to use helpers defined in ApplicationHelper in your views | |
| # helper ApplicationHelper |