Last active
August 29, 2015 14:19
-
-
Save bjfish/742dcc0c6ff8ab08dd3c to your computer and use it in GitHub Desktop.
Run a small Rakefile Tutorial with ruby/rake
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
# Add a small Rakefile to current directory | |
task :default => [:test] | |
task :test do | |
puts "Hello Rake" | |
end | |
# Rake's file_utils.rb needs the following small workaround/change: | |
RUBY = '/Users/brandonfish/Documents/jruby-mine/bin/jruby' | |
# ENV['RUBY'] || File.join( | |
# RbConfig::CONFIG['bindir'], | |
# RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT']). | |
# sub(/.*\s.*/m, '"\&"') | |
# Fix path to your rake and run | |
$~/Documents/jruby-mine/bin/jruby -X+T -e '$:.unshift("/Users/brandonfish/Documents/rake/lib");require "rake";Rake.application.run' | |
Hello Rake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bash profile function. Because it sets the RUBY var no ruby/rake change is needed.
Then just