ryanb / ruby-warrior

Game written in Ruby for learning Ruby.
MIT License
3.83k stars 838 forks source link

don't store absolute tower path in .profile #27

Open bleything opened 14 years ago

bleything commented 14 years ago

... because when I move my player directories to a machine on a different platform, my profiles become invalid :)

Splendorr commented 13 years ago

I was going to suggest this same thing. I moved from a computer with the home folder "sandygreen" to one with a home folder "cinilomis," running RVM on both machines, with the same version of Ruby and the same version of rubywarrior installed in the same way. Here's my error message when I try to run the save I copied:

/Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/level.rb:31:in read': No such file or directory - /Users/sandygreen/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/towers/beginner/level_009.rb (Errno::ENOENT) from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/level.rb:31:inload_level' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/level.rb:45:in play' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:72:inplay_current_level' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:63:in play_normal_mode' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:23:instart' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/lib/ruby_warrior/runner.rb:17:in run' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/gems/rubywarrior-0.1.1/bin/rubywarrior:5:in<top (required)>' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/bin/rubywarrior:19:in load' from /Users/cinilomis/.rvm/gems/ruby-1.9.2-p0/bin/rubywarrior:19:in

'