Pergunta

In order to push my local SQLite3 database to Heroku, I have installed pik so that I can use ruby -v 192. (I was getting a timezone error, and other posts suggested that it may be due to using ruby version 193).

I followed the directions on github: http://rubyonwindowsguides.github.com/book/ch02-03.html

I am now able to switch between v 193 and v192, and have bundle installed the necessary gems I'm aware of, including pg (0.12.2 x86-mingw32) and taps (0.3.24).

Everything is fine when I'm in v193.

However, in v192, when I try to run:

Heroku run rake db:migrate

or

Heroku db:push

...I get an error page that reads:

Running 'rake db:migrate' attached to terminal... up, run.1
bash: bin/bundle: c:/Users/umezo/.pik/rubies/Ruby-192-p290/bin/ruby.exe: bad interpreter: No such file or directory

This seems like a path problem, as my Ruby libraries are in c:/, and not c:/Users/Umezo/.pik. I think I may have installed the initial path to v192 in the .pik folder instead of in c:/. What can I do to fix this problem?

My relevant files are saved as recommended in the github instructions:

c:/Ruby192
c:/Ruby193
c:/tools/pik.bat
c:/tools/pik.ps1
c:/tools/pik_runner.exe
c:/Users/umezo/.bashrc
c:/Users/umezo/.pik/.pikrc
c:/Users/umezo/.pik/config.yml

respectively, and the file contents are:

.pikrc

#!/bin/sh
pik_path=/c/tools
function pik  {
  $pik_path/pik_runner.exe pik.sh $@
  [[ -s $USERPROFILE/.pik/pik.sh ]] && source $USERPROFILE/.pik/pik.sh
  unset GEM_HOME
  unset GEM_PATH
} 

config.yml

--- 
"192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]": 
  :path: !ruby/object:Pathname 
    path: C:/Ruby192/bin

"193: ruby 1.9.3p0 (2011-10-30) [i386-mingw32]": 
  :path: !ruby/object:Pathname 
    path: C:/Ruby193/bin
--- {}

.bashrc

[[ -s $USERPROFILE/.pik/.pikrc ]] && source $USERPROFILE/.pik/.pikrc
unset GEM_HOME
unset GEM_PATH

I'm still not sure how all of these files are interconnected, or what exactly each of them does, so am not sure which files to change or move.

Thanks in advance for your help!!

Foi útil?

Solução

I never figured out the root cause of this issue, so ended up reinstalling my ruby installations. Now it works fine!

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top