Skip to content

Instantly share code, notes, and snippets.

@ruprict
ruprict / Error I get
Last active December 28, 2015 11:09
TorqueBox configure issue
NoMethodError: undefined method `[]' for nil:NilClass
local_config at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_registrar_web/gems/torquebox-configure-3.0.0-java/lib/torquebox/configuration.rb:129
finalize_options at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_registrar_web/gems/torquebox-configure-3.0.0-java/lib/torquebox/configuration.rb:122
process at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_registrar_web/gems/torquebox-configure-3.0.0-java/lib/torquebox/configuration.rb:64
configure at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_registrar_web/gems/torquebox-configure-3.0.0-java/lib/torquebox/configure.rb:27
(root) at /Users/ggoodrich/projects/kyck/kyck_registrar_web/config/initializers/torquebox.rb:4
load at org/jruby/RubyKernel.java:1101
(root) at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_registrar_web/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:1
load_dependency at /Users/ggoodrich/.rvm/gems/jruby-1.7.6@kyck_reg
<form name="form" class="css-form" novalidate ng-submit="applyFilter(filter)" > <!-- ng-submit="submitRequest(org)" -->
<div class="panel radius">
<div class="row large-7">
<div class="large-2 columns">
<label class="right inline" for="filter_status"><%= t('form.fields.status')%></label>
</div>
<div class="large-10 columns" >
<%=select_tag "filter[status]", options_for_select(CardData.get_status_values), id: 'filter_status', include_blank: true, "ng-model" => "filter.status" %>
</div>
</div>
<%= label_tag "sanctioning_request[issuer][first_name]", I18n.t("forms.fields.first_name"), {"ng-model" => "sanctioningRequest.issuer.first_name"} %>
<%= text_field_tag "sanctioning_request_issuer_first_name",nil, {"name" => "sanctioning_request[issuer][first_name]", "ng-model" => "sanctioningRequest.issuer.first_name", "required" => "required"} %>
<% if @errors && @errors[:issuer_first_name] %>
<small class="error"><%= @errors[:issuer_first_name].first %></small>
<% end %>
</div>
<div>
<%= label_tag "sanctioning_request[issuer][last_name]", I18n.t("forms.fields.last_name"), {"ng-model" => "sanctioningRequest.issuer.last_name"} %>
<%= text_field_tag "sanctioning_request_issuer_last_name",nil, {"name" => "sanctioning_request[issuer][last_name]", "ng-model" => "sanctioningRequest.issuer.last_name", "required" => "required"} %>
<% if @errors && @errors[:issuer_last_name] %>
<div>
<%= label_tag "sanctioning_request[on_behalf_of][name]", I18n.t("forms.fields.name"), {"ng-model" => "sanctioningRequest.on_behalf_of.name"} %>
<%= text_field_tag "sanctioning_request_on_behalf_of_name",nil, {"name" => "sanctioning_request[on_behalf_of][name]", "ng-model" => "sanctioningRequest.on_behalf_of.name", "required" => "required"} %>
<% if @errors && @errors[:on_behalf_of_name] %>
<small class="error"><%= @errors[:on_behalf_of_name].first %></small>
<% end %>
</div>
<div>
<%= label_tag "sanctioning_request[on_behalf_of][phone_number]", I18n.t("forms.fields.phone"), {"ng-model" => "sanctioningRequest.on_behalf_of.phone_number"} %>
<%= text_field_tag "sanctioning_request_on_behalf_of_phone_number",nil, {"name" => "sanctioning_request[on_behalf_of][phone_number]", "ng-model" => "sanctioningRequest.on_behalf_of.phone_number", "required" => "required"} %>
@ruprict
ruprict / gist:5858108
Created June 25, 2013 12:35
Exception accessing Neo4j after 2.3 upgrade
Java::JavaLang::RuntimeException (org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.StoreLockerLifecycleAdapter@3ed858f6' was successfully initialized, but failed to start. Please see attached cause exception.):
org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:281)
org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase.<init>(EmbeddedReadOnlyGraphDatabase.java:113)
org.neo4j.kernel.EmbeddedReadOnlyGraphDatabase.<init>(EmbeddedReadOnlyGraphDatabase.java:99)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.lang.reflect.Constructor.newInstance(Constructor.java:525)
org.jruby.javasupport.JavaConstructor.newInstanceDirect(JavaConstructor.java:291)
org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:104)
@ruprict
ruprict / torquebox.conf
Created May 21, 2013 17:54
Torquebox upstart file
description "This is an upstart job file for TorqueBox"
pre-start script
bash << "EOF"
mkdir -p /var/log/torquebox
chown -R torquebox /var/log/torquebox
EOF
end script
start on started network-services
def nav_link(link_text, link_path, force_active = false)
class_name = (force_active || current_page?(link_path)) ? 'active' : ''
content_tag(:li, :class => class_name) do
link_to link_text, link_path
end
end
Users/ggoodrich/projects/kyck/kyck_registrar_web/config/initializers/devise.rb:247 warning: already initialized constant VERIFY_PEER
/Users/ggoodrich/.rvm/gems/jruby-1.7.3@kyck_registrar_web/gems/actionpack-3.2.12/lib/action_dispatch/http/mime_type.rb:103 warning: already initialized constant PDF
Starting local Neo4j using db /Users/ggoodrich/projects/kyck/kyck_registrar_web/db/neo4j-development using Java::OrgNeo4jKernel::EmbeddedGraphDatabase
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/ggoodrich/.rvm/gems/jruby-1.7.3@kyck_registrar_web/gems/neo4j-admin-0.2.0-java/lib/neo4j-admin/jars/slf4j-jdk14-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/ggoodrich/.rvm/gems/jruby-1.7.3@kyck_registrar_web/bundler/gems/neo4j-enterprise-7300c3711bd8/lib/neo4j-enterprise/jars/logback-classic-0.9.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
May 10,
@ruprict
ruprict / create_devise_admin_users.rb
Created May 5, 2013 17:20
create_devise_admin_users
def self.up
create_table(:admin_users) do |t|
## Database authenticatable
t.string :email, :null => false, :default => ""
t.string :encrypted_password, :null => false, :default => ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
@ruprict
ruprict / .gitignore
Last active December 11, 2015 22:58 — forked from karmi/.gitignore
.DS_Store
*.csv
*.pdf