This file contains 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
namespace :spree do | |
desc "Export Products to CSV File" | |
task :export_products => :environment do | |
require 'csv' | |
products = Product.where(:deleted_at => nil).all | |
puts "Exporting to #{RAILS_ROOT}/products.csv" | |
CSV.open("#{RAILS_ROOT}/products.csv", "w") do |csv| | |
csv << [ |
This file contains 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
en: | |
activerecord: | |
errors: | |
messages: | |
restrict_to: "is not one of the allowed options (%{allowed_options})" |
This file contains 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
When I press "Continue »" # features/step_definitions/web_steps.rb:52 | |
Then I should see "Membership information successfully saved" # features/step_definitions/web_steps.rb:106 | |
*** glibc detected *** ruby: double free or corruption (!prev): 0x0000000008899790 *** | |
======= Backtrace: ========= | |
/lib/x86_64-linux-gnu/libc.so.6(+0x78a8f)[0x7f0fd98cda8f] | |
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x73)[0x7f0fd98d18e3] | |
/usr/lib/libmysqlclient_r.so.16(free_root+0xd0)[0x7f0fd5a89c00] | |
/usr/lib/libmysqlclient_r.so.16(mysql_free_result+0x4f)[0x7f0fd5aaf60f] | |
/home/tyler/.rvm/gems/ruby-1.9.2-p290@gemset/gems/mysql2-0.2.10/lib/mysql2/mysql2.so(+0x35b4)[0x7f0fd5e425b4] | |
/home/tyler/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.so.1.9(+0x17b356)[0x7f0fda84c356] |
This file contains 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
# This allows you to represents a JavaScript function with a proc. When converted to JSON, it will | |
# automatically wrap the method body with "function(){" and "}" and list as many arguments as you | |
# had listed in your proc, automatically giving them the names a, b, c, etc. | |
# | |
# This is convenient when you want to create a Ruby hash representating options to be passed to | |
# a JavaScript method, which you plan to call to_json on when you actually output the method call | |
# to the web page. If you tried to represent your JavaScript function with a string value in the | |
# hash, then when you called to_json on the hash, it would in turn call String#to_json, which | |
# returns an escaped copy of the string surrounded by quotes. | |
# |
This file contains 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
#!/usr/bin/env ruby | |
#--------------------------------------------------------------------------------------------------- | |
# TODO: | |
# doesn't handle if multiple conflict markers!! | |
#--------------------------------------------------------------------------------------------------- | |
require 'pathname' | |
require 'facets/file/rewrite' | |
require 'quality_extensions/pathname' |
This file contains 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
> zeus start | |
Starting Zeus server v0.15.3 | |
[ready] [crashed] [running] [connecting] [waiting] | |
boot | |
├── default_bundle | |
│ └── development_environment | |
│ └── prerake | |
├── default_bundle_with_test_env | |
│ └── test_environment | |
│ ├── cucumber_environment |
This file contains 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
require "prawn" | |
Prawn::Document.generate("#{__FILE__}.pdf") do |pdf| | |
pdf.start_new_page margin: [100, 100, 100, 100] | |
pdf.stroke_axis | |
orig_bounds_width = pdf.bounds.width | |
pdf.formatted_text_box [ { :text => "width: #{pdf.bounds.width}" } ], :at => [0, 20] | |
pdf.indent(100) do | |
pdf.stroke_axis |
This file contains 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
canvas (stable) > time bundle exec rake canvas:compile_assets | |
--> Compiling static assets [css] | |
warning Webkit only supports pixels for the start and end stops for radial gradients. Got: 100% | |
warning Webkit only supports pixels for the start and end stops for radial gradients. Got: 100% | |
warning Webkit only supports pixels for the start and end stops for radial gradients. Got: 100% | |
--> creating styleguide | |
# writing file: app/views/info/styleguide.html.erb | |
--> Compiling static assets [jammit] | |
--> Compiled static assets [css/jammit] | |
--> Compiling static assets [javascript] |
This file contains 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
Following https://github.com/instructure/canvas-lms/wiki/Quick-Start I ran into some problems. Here's what I did to work around them. | |
I am installing on my development computer, running Ubuntu 13.10. | |
dpkg --get-selections | egrep -i "postgresql" | |
postgresql install | |
postgresql-9.1 install | |
postgresql-9.1-postgis deinstall | |
postgresql-client-9.1 install | |
postgresql-client-common install |
NewerOlder