This gist describes how to setup a rails backbone project with testing frameworks.
Example Gemfile to start with.
| Titanium.UI.setBackgroundColor('red'); | |
| // root | |
| var rootWin = Ti.UI.createWindow({ | |
| title: 'Root Win', | |
| backgroundColor: 'gray', | |
| tabBarHidden: true, | |
| navBarHidden: true | |
| }); |
| # https://github.com/gzigzigzeo/carrierwave-meta | |
| # Integrating CarrierWave with JCrop | |
| # Let implement the behavior like at this demo: deepliquid.com/projects/Jcrop/demos.php?demo=thumbnail | |
| # The uploader: | |
| class CropUploader < SobakaUploader | |
| include CarrierWave::Meta | |
| # Crop source is a source image converted from original which could be bigger than source area (left image in the example). | |
| version :crop_source do |
| property baseURL : "http://statusboard.dev/song?" | |
| if application "Spotify" is running then | |
| tell application "Spotify" | |
| set theTrack to name of the current track | |
| set theArtist to artist of the current track | |
| set theAlbum to album of the current track | |
| set theurl to spotify url of the current track | |
| try | |
| do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |
| # Rake task to launch multiple Resque workers in development/production with simple management included | |
| require 'resque/tasks' # Require Resque tasks | |
| namespace :workers do | |
| # = $ rake workers:start | |
| # | |
| # Launch multiple Resque workers with the Rails environment loaded, | |
| # so they have access to your models, etc. |
| /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:481: [BUG] Segmentation fault | |
| ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0] | |
| -- Control frame information ----------------------------------------------- | |
| c:0059 p:---- s:0255 b:0255 l:000254 d:000254 CFUNC :unmix | |
| c:0058 p:0065 s:0250 b:0250 l:000242 d:000249 BLOCK /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:481 | |
| c:0057 p:0019 s:0247 b:0247 l:000246 d:000246 METHOD <internal:prelude>:10 | |
| c:0056 p:0419 s:0244 b:0243 l:000242 d:000242 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:477 | |
| c:0055 p:0327 s:0227 b:0227 l:000226 d:000226 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:371 | |
| c:0054 p:0322 s:0219 b:0219 l:000218 d:000218 METHOD /Users/peter/.rvm/gems/ruby-1.9.3-p327/gems/blockenspiel-0.4.5/lib/blockenspiel/impl.rb:298 |
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |
This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets from https://github.com/skaes/rvm-patchsets
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.