This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CmsPageNotFound < StandardError; end | |
class PublicController < ApplicationController | |
rescue_from CmsPageNotFound do | |
render 'not_found', :status => :not_found and return false | |
end | |
def index | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
default_run_options[:pty] = true | |
set :rvm_ruby_string, '1.9.2-p290' # Or whatever env you want it to run in. | |
set :application, "masterdatamachine" | |
set :domain, '50.57.132.151' | |
set :applicationdir, "/var/www/#{application}" | |
set :repository, "[email protected]:glideint/Master-Data-Machine.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='container' style="width:960px;position:relative;margin:0 auto;"> | |
<nav style="background:url('nav_bg.png') no-repeat;position:relative;left:-330px;width:1620px;height:377px;"/> | |
<div class="navContainer" style="width:960px;margin:0 auto;"> | |
<ul> | |
<li>SOME CONTENT</li> | |
<li>SOME CONTENT</li> | |
<li>SOME CONTENT</li> | |
</ul> | |
</div> | |
</nav> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orgs_array.each do |uid| | |
search_results[uid] = Listing.search do | |
query { | |
boolean do | |
should { term :short_description, search_terms} | |
should { term :full_description, search_terms} | |
should { term :manufacturers_name, search_terms} | |
should { term :manufacturers_part_num, search_terms} | |
should { term :suppliers_name, search_terms} | |
should { term :suppliers_part_num, search_terms} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** [out :: ...] Your bundle is complete! It was installed into ./vendor/bundle | |
command finished in 89049ms | |
triggering after callbacks for `deploy:bundle_gems' | |
. | |
. | |
. | |
command finished in 681ms | |
* executing `deploy:migrate' | |
* executing "cd .../releases/20111018141607 && rake RAILS_ENV=production db:migrate" | |
servers: [...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | |
require "rvm/capistrano" # Load RVM's capistrano plugin. | |
default_run_options[:pty] = true | |
set :rvm_ruby_string, '1.9.2-p290' # Or whatever env you want it to run in. | |
set :application, "masterdatamachine" | |
set :domain, '50.57.132.151' | |
set :applicationdir, "/var/www/#{application}" | |
set :repository, "[email protected]:glideint/Master-Data-Machine.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╭─core@new-host-2 ~/egiden ‹ruby-1.8.7@ryanbigg› | |
╰─$ rvm gem update --system | |
WARN: Please note that `rvm gem ...` is only an alias to `rvm do gem ...`, | |
it might work different as in earlier versions of RVM and will be shortly removed! | |
/Users/core/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/timeout.rb:60: [BUG] Bus Error | |
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.2.0] | |
/Users/core/.rvm/scripts/set: line 51: 66284 Abort trap: 6 gem update '--system' | |
Updating rubygems-update | |
Fetching: rubygems-update-1.8.11.gem (100%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p290 :048 > @listings[1] | |
=> #<Tire::Results::Collection:0x00000103385a00 @response={"took"=>6, "timed_out"=>false, "_shards"=>{"total"=>5, "successful"=>5, "failed"=>0}, "hits"=>{"total"=>29, "max_score"=>0.021450784, "hits"=>[{"_index"=>"mongo-listings", "_type"=>"listing", "_id"=>"4e95fc502b36da04a3000012", "_score"=>0.021450784, "_source"=>{"_id"=>"4e95fc502b36da04a3000012", "action"=>nil, "air_connection"=>nil, "base_unit_of_measure"=>"EA", "country_of_origin"=>"US", "diaphragm_area"=>nil, "diaphragm_case_material"=>nil, "diaphragm_material"=>nil, "full_description"=>"ACTUATOR VALVE DIAPHRAGM; 65 PSI SPRING,SIZE 60,2 IN STEM TRV,FISHER CONTROLS CO MODEL 667-151M, AS SUPPLIED ON PO PN-R81-34-0081-NA", "klass_attributes"=>"ACTUATOR:VLVDPHR", "listing_name"=>"Some funky import", "manufacturers_name"=>"FISHER CONTROLS INTERNATIONAL", "manufacturers_part_num"=>"667-60-151M", "maximum_stem_travel"=>"2 IN", "minimum_order_qty"=>"0", "mounting"=>nil, "organization_id"=>1, "product_type"=>"Service", "s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"_index"=>"mongo-listings", | |
"_type"=>"listing", | |
"_id"=>"4e95fc502b36da04a3000012", | |
"_score"=>0.07227325, | |
"_source"=> | |
{"_id"=>"4e95fc502b36da04a3000012", | |
"action"=>nil, | |
"air_connection"=>nil, | |
"base_unit_of_measure"=>"EA", | |
"country_of_origin"=>"US", |