From: Duane Morin Date: 2006-10-27T22:59:04+09:00 Subject: Re: Rubyscript2Exe directory management Ok, not really sure what changed on me, but I'm getting different results now. I can run --eee-justextract on my application and it does successfully explode itself into the current directory. I could swear that it tried to extract itself into the temp directory yesterday, I did not imagine that nested C:\ error message :). But now my error has changed. When I run the app directly as an executable (something I don't want to do, because my operations guy wants this thing to have a permanent home, not extract itself as needed), it runs. But when I extract it first and then run it, it keeps telling me some key gems I need are missing. ActiveRecord, for one: ./lib/rubygems.rb:251:in `report_activate_error': Could not find RubyGem activer ecord (>= 0.0.0) (Gem::LoadError) from ./lib/rubygems.rb:188:in `activate' from ./lib/rubygems.rb:66:in `active_gem_with_options' from ./lib/rubygems.rb:59:in `require_gem' from ./lib/profileelement.rb:1 from ./lib/rubygems/custom_require.rb:27:in `gem_original_require' from ./lib/rubygems/custom_require.rb:27:in `require' from ./lib/pdf_output.rb:8 from ./lib/rubygems/custom_require.rb:27:in `gem_original_require' from ./lib/rubygems/custom_require.rb:27:in `require' from app/init.rb:39 Which is where because, from what I can see, it's in there: Directory of C:\bla\lib\rubyscript2exe.gems\gems\activerecord-1.14.4 10/27/2006 09:44 AM . 10/27/2006 09:44 AM .. 10/27/2006 09:53 AM 129,246 CHANGELOG 10/27/2006 09:44 AM examples 10/27/2006 09:53 AM 747 install.rb 10/27/2006 09:44 AM lib 10/27/2006 09:53 AM 5,997 Rakefile 10/27/2006 09:53 AM 11,797 README 10/27/2006 09:53 AM 1,780 RUNNING_UNIT_TESTS 10/27/2006 09:44 AM test 5 File(s) 149,567 bytes I am specifying the -I lib\ parameter, as described in the instructions: bin\ruby -I lib\ app\init.rb I know it's in there and works, because as I said, when I don't extract, it works fine. Could it be extracting into the wrong place or something? This happened with a number of other libraries (pdf-writer, rubyzip) but through some juggling of directories and additional -I parameters I made those go away. But I'm stuck on activerecord now. d Duane Morin wrote: > I'd like to use rubyscript2exe to move over a Ruby application and its > environment to a production box that will be run by a sysadmin. As such > he needs some control over things like where the app installs itself, > and the ability to modify the config.yml file I've associated with the > app. I don't really have a handle on what I can and can't control. > This is a windows box, by the way. > > For instance, the app and everything about it seems to install itself > relative to c:\documents and settings\user\local settings.... blah blah > blah. I would rather be able to tell it exactly where to uninstall > itself. Possible? I suppose I can set the TEMP environment variable, > but that seems like a hack that I wouldn't be too excited to write in > the official instructions. > > Second, I can't "just extract" the app. I try running with the > --eee-just-extract flag and I get this: COuldn't create directory > c:\temp\C:/ApplicationDirectory > > where c:\ApplicationDirectory is what my present working directory was > when I ran the original rubyscript2exe executable. Just thinking aloud, > can I manipulate either the appdir or userdir variable during the > is_compiling phase to change this? How do I make the extra C:\ go away > so it is a legal directory? > > Is there any way to tell the app that it's ok to use the directories > specified? For instance in my config.yml file if I want to say datadir: > d:\client\data\ftp or something like that, I can't seem to get it to > work properly. I think it is looking for this directory relative to the > temp area where the app installed itself, which is not what I want. > > Thanks for any help! > > Duane -- Posted via http://www.ruby-forum.com/.