Daniel Zepeda wrote:
Alex F. wrote:
- the rakefile can detect which ruby is running it more portably (patch
I read this through the Ruby Forum’s web interface, I don’t get the
emails, so I didn’t see the attached patch. Should I change my
preferences or something?
Strange, the reply has also disappeared completely from our own
Patch copied inline below.
By ‘not fully working’ do you mean you weren’t able to get a working
package on Windows? I verified it on my copy of Windows XP, so maybe
you are using a different kind of Windows?
It was on OS X. The methods app_ruby_executable and ruby_executable test
RUBY_PLATFORM for “i686-darwin9”, but for my standard ruby
(/usr/bin/ruby) the platform is “universal-darwin9” so the case
statement falls through and raises. That’s why I tried
Config::CONFIG[‘RUBY_INSTALL_NAME’] + Config::CONFIG[‘EXEEXT’]
Environment.app_name + Config::CONFIG[‘EXEEXT’]
But that’s not quite all that’s needed, because build/bin/ruby hasn’t
Really all that does is rename the ruby executable to a name associated
with the packaged program. I’m not sure that it is really necessary.
It’s just a little bit of polish. It affects how the app is labelled in
the Dock (OSX) and in Alt-Tab, Task Manager (Windows), otherwise it
shows as ‘ruby’.
What I was thinking of was a ripped-off idea from rails, have a script
that generates the structure and scripts initially, going the
‘convention-over-configuration’ route as much as possible. The
pre-defined structure also makes it easier to get off-and-running on a
Yep, I’ve only tried rails once a while ago, but I liked the ‘scaffold’
diff --git a/Rakefile b/Rakefile
index 7750810…4689030 100644
@@ -15,7 +15,9 @@ end
desc “Run Project”
task :run => Environment.base_class_path do
ENV[Environment.app_env_const] = ‘development’
- executable = RUBY_PLATFORM =~ /darwin/ ? “/opt/local/bin/ruby” :
@@ -40,4 +42,4 @@ def make_bases_relative
-task :default => :spec
\ No newline at end of file
+task :default => :spec