February 2010
10 posts
2 tags
Using open3 in ruby to call an interactive shell...
Apparently when using the three standard pipes (stdin, stdout, stderr) in your own programming, it is REALLY easy to block or deadlock on them. At first I figured there were problems in the ruby *open3 library, but this is not ruby specific, I found message board discussions about similar problems using perl open3 libraries. Trying to figure out these quirks is made harder by the fact that...
3 tags
Call a custom jar from ruby in jruby
1 2 3 4 5 6 7 8 9 #javac HelloWorld.java && jar cvf HelloWorld.jar HelloWorld.classrequire ‘java’ require ‘HelloWorld.jar’ import ‘HelloWorld’ puts HelloWorld.new.hello #=> “Hello cruel world” #jruby hello_world.rb Posted via email from a timocracy of one | Comment »
Call a custom jar from ruby in jruby #ruby #tech...
1 2 3 4 5 6 7 8 9 #javac HelloWorld.java && jar cvf HelloWorld.jar HelloWorld.classrequire ‘java’ require ‘HelloWorld.jar’ import ‘HelloWorld’ puts HelloWorld.new.hello #=> “Hello cruel world” #jruby hello_world.rb Posted via email from a timocracy of one | Comment »
2 tags
Making config.gem in Rails 2.3.x allow you to...
If you are on Rails 2.3.x (pre-Bundler) and want to organize some of your shared functionality into gems, but they are for internal use only, you could set-up a private gem server and point the :source at this server. And then you could deal with authentication, and then… Or as a quick hack you could just allow for config.gem to reference the gemfile directly, which would then mean...
3 tags
"Object is not missing constant XXX" and "A copy...
If you have a Rails metals that has enough code to have its own subdirectories that live in your Rails load_paths you can get stuck in dependency hell. The combinations of autoloading, rails reloading on development, and running through the metal can intersect in nasty ways: on the first request you get “Object is not missing constant XXX” and subsequent requests kick off “A...
"Object is not missing constant XXX" and "A copy...
If you have a Rails metals that has enough code to have it’s own subdirectories that live in your Rails load_paths you can get stuck in dependency hell. The combinations of autoloading, rails reloading on development, and running through the metal can intersect in nasty ways: on the first request you get “Object is not missing constant XXX” and subsequent requests kick off...
4 tags
Tagging a git release with current branch name and...
Either add this to your .git/config [alias] datetag = !git tag `git name-rev --name-only HEAD`-`date \"+%Y%m%d%H%M\"` or run it in your project folder to add it to the config for that project: git config alias.datetag '!git tag `git name-rev --name-only HEAD`-`date "+%Y%m%d%H%M"`' Posted via web from a timocracy of one | Comment »
Tagging a git release with current branch name and...
Either add this to your .git/config [alias]: datetag = !git tag `git name-rev --name-only HEAD`-`date \"+%Y%m%d%H%M\"` or run it in your project folder to add it to the config for that project: git config alias.datetag '!git tag `git name-rev --name-only HEAD`-`date "+%Y%m%d%H%M"`' Posted via web from a timocracy of one | Comment »
4 tags
Setting RAILS_ENV on Dreamhost when running...
It may depend on which server you are on, but mine has mod_env enabled, so it’s a simple matter of setting the ENV[‘RAILS_ROOT’] in an .htacess file SetEnv RAILS_ENV staging Posted via email from a timocracy of one | Comment »
Setting RAILS_ENV on Dreamhost when running...
It may depend on which server you are on, but mine has mod_env enabled, so it’s a simple matter of setting the ENV[‘RAILS_ROOT’] in an .htacess file SetEnv RAILS_ENV staging Posted via email from a timocracy of one | Comment »