Skip to content

Instantly share code, notes, and snippets.

View phlegx's full-sized avatar
💪
never stop coding

Phlegx Systems phlegx

💪
never stop coding
View GitHub Profile
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz
stepping : 5
microcode : 0x3
cpu MHz : 2667.000
cache size : 4096 KB
physical id : 0
de:
# ACTIVE RECORDS
activerecord:
attributes:
backer:
# ERRORS
errors:
models:
backer:
Failures:
1) the sign in process signs me in
Failure/Error: visit '/'
ChildProcess::LaunchError:
No such file or directory - -no-remote
# /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/childprocess-0.5.3/lib/childprocess/unix/fork_exec_process.rb:58:in `launch_process'
# /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/childprocess-0.5.3/lib/childprocess/abstract_process.rb:82:in `start'
# /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/binary.rb:56:in `execute'
# /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/binary.rb:34:in `start_with'
Exception `LoadError' at /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/nokogiri-1.6.3.1/lib/nokogiri.rb:27 - cannot load such file -- nokogiri/2.1/nokogiri
Type application/vnd.ms-fontobject already registered as a variant of application/vnd.ms-fontobject.
Type application/vnd.ms-word.document.macroEnabled.12 already registered as a variant of application/vnd.ms-word.document.macroenabled.12.
Type application/vnd.ms-word.template.macroEnabled.12 already registered as a variant of application/vnd.ms-word.template.macroenabled.12.
Type multipart/x-parallel already registered as a variant of multipart/parallel.
Type text/plain already registered as a variant of text/plain.
Type video/vnd.dlna.mpeg-tts already registered as a variant of video/vnd.dlna.mpeg-tts.
Exception `NameError' at /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/rspec-core-2.99.0/lib/rspec/core/backward_compatibility.rb:14 - uninitialized constant BigDecimal
Exception `NameError' at /home/user/.rvm/gems/ruby-2.1.1@projectname/gems/rspec-c
scope :by_provider, lambda{ |cpf| joins(common: [{ channels: :authentication }]).where("provider IN (#{cpf})") }
@phlegx
phlegx / gist:4fe3bd7df1eab5d780d6
Last active August 29, 2015 14:23
Websocket-Rails duplicate messages
[["client_connected",{"id":null,"channel":null,"user_id":null,"data":{"connection_id":"ac42958a66e6682a07d7","user_id":1},"success":null,"result":null,"token":null,"server_token":null}]]
["websocket_rails.subscribe",{"id":119155,"data":{"channel":"unit_channel"}}]
[["websocket_rails.channel_token",{"id":null,"channel":"unit_channel","user_id":null,"data":{"token":"a37d1c7d-73ef-4070-983c-384d9ac10fe4"},"success":null,"result":null,"token":null,"server_token":null}]]
[["websocket_rails.subscribe",{"id":119155,"channel":null,"user_id":null,"data":{"channel":"unit_channel","success":"Channel authorization successful."},"success":true,"result":null,"token":null,"server_token":null}]]
[["websocket_rails.channel_token",{"id":null,"channel":"unit_channel","user_id":null,"data":{"token":"57b0fc35-bb50-4acc-a547-79e4b87a8690"},"success":null,"result":null,"token":null,"server_token":null}]]
[["websocket_rails.subscribe",{"id":119155,"channel":null,"user_id":null,"data":null,"success":true,"result":null,"token":null,"s
@phlegx
phlegx / my_controller.rb
Last active August 29, 2015 14:24
Websocket-Rails Rescue
MyController < WebsocketRails::BaseController
include ActionController::Rescue
rescue_from ActiveRecord::RecordNotFound, with: :not_found_error
def not_found_error(exception)
# do something here
end
end
deployer@hostname:~$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
-sh: syntax error near unexpected token `
# Error
can't convert nil into String
Extracted source (around line 47 </a>):
44: </p>
45:
46: <p>
47: <%= image_tag(@customer_setting.image_url(:thumb)) if @customer_setting.image?%><br/>
48: <p/>
can't convert nil into String
Extracted source (around line #47):
44: </p>
45:
46: <p>
47: <%= image_tag(@customer_setting.image_url(:thumb)) if @customer_setting.image?%><br/>
48: <p/>
49: </fieldset>