Get get my Pik running on Cygwin/GitBash despite all necessary changes

279 views
Skip to first unread message

envynicky

unread,
Jul 5, 2011, 8:48:30 AM7/5/11
to pik help and suggestions
Hello Group,

I have been looking for solution to my problem for many days now. One
the problem not much resources are available on Pik and second my
issues seems to something associated with my lack of knowledge.

I got Pik Installed on by windows machine from command line and its
works fine there, I got Cygwin and GitBash installed to give my
development linux like environment. From here i can see and use ruby
but cant see the Pik and it throws an error "command not found".

I changed the .bashrc file at many places with the $USERPROFILE change
that installation of pik on command line prompts, but still the issue
is there. Even I changed the $PATH variable ensuring pik installation
path before ruby path. I believe the issue is with correct .bashrc
file as i made changes to bash_history that is available in my user
directory, as i could not locate other .bashrc file. Remember i use
Xp.

I would seek groups help in getting me out of this issue as i don't
want to move on until i resolve this issue.


Thanks.

Luis Lavena

unread,
Jul 5, 2011, 5:32:32 PM7/5/11
to pik help and suggestions
Hello,

On Jul 5, 9:48 am, envynicky <verman...@gmail.com> wrote:
>
> I got Pik Installed on by windows machine from command line and its
> works fine there, I got Cygwin and GitBash installed to give my
> development linux like environment. From here i can see and use ruby
> but cant see the Pik and it throws an error "command not found".
>

For pik to work under cygwin bash or git-bash (which is MSYS) you need
to modify either .bashrc, .profile or .bash_profile files.

This is how I have it setup in my system and how it works:

I've Pik installed in %HOME_TOOLS%\bin, which is added to the PATH.
%HOME_TOOLS% points to %HOME%\Tools, but is not relevant for this.

The contents of my .profile:

[[ -s $HOME_TOOLS/bin/pik.sh ]] && source $HOME_TOOLS/bin/pik.sh

I've checked that %HOME_TOOLS%\bin\pik.sh exist and contains the
following:

https://github.com/vertiginous/pik/blob/master/tools/pik.sh

Now, using pik just works:

Luis@KEORE ~
$ type pik
pik is a function
pik ()
{
pik_runner.exe pik.sh $@;
if [[ -n "${PIK_HOME}" ]]; then
[[ -s $PIK_HOME/pik_run.sh ]] && source $PIK_HOME/pik_run.sh;
else
[[ -s ~/.pik/pik_run.sh ]] && source ~/.pik/pik_run.sh;
fi
}

Luis@KEORE ~
$ pik --version
pik 0.3.0.pre on Microsoft Windows [Version 6.1.7601]
by Gordon Thiesfeld (gthie...@gmail.com)

Luis@KEORE ~
$ pik ls
ruby-1.8.6-p398
ruby-1.8.7-p334
ruby-1.9.2-p180
ruby-1.9.3-dev

Luis@KEORE ~
$ pik 192

Luis@KEORE ~
$ ruby --version
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

===

Can you try the same?

--
Luis Lavena

Luis Lavena

unread,
Jul 8, 2011, 8:47:19 AM7/8/11
to envynicky, discu...@googlegroups.com
Hello,

Please respond to the group, so all benefit with the answers.

On Fri, Jul 8, 2011 at 6:23 AM, envynicky <verm...@gmail.com> wrote:
> Hello,
>
> I tried what you have suggested but not getting through still.
>
> I have got Pik installed at C:\pik
> I have added this path to Environment variable before Ruby path
> I added the command [[ -s $USERPROFILE/.pik/.pikrc ]] && source
> $USERPROFILE/.pik/.pikrc in all .bashrc, .profile and .bash_profile
> files that i found on Cygwin folder.
> My Cygwin is located at C:\Cygwin
> Still I am unable to find the solutions
> My Git is installed inside programs folder in C and i could not trace
> any .bash files and hence could not modify anything.
>

What I see is that you invoked .pikrc, but is not what I pasted before
that worked for me.

First and most important, inside cygwin or Git-bash, please do:

cd ~
pwd

That directory you obtain from invoking pwd, is where your .profile
should be added.

Please add the exact same code I showed before:

<code>
echo "Here is my .profile being loaded"


[[ -s $HOME_TOOLS/bin/pik.sh ]] && source $HOME_TOOLS/bin/pik.sh

</code>

And you can even add a echo so you know is invoked.

Change $HOME_TOOLS/bin with the path where you installed Pik, where
you installed it?

Also, check the contents of pik.sh, needs to look like this:

https://github.com/vertiginous/pik/blob/master/tools/pik.sh

Does looks like that? where is that file in your system? needs to be
along pik_runner.exe and pik.bat. Where those files are?

> Thanks
>
> Please check and let me know in case you get to some error sin my
> understanding or suggest a way around.
>

So far seems we are not talking the same thing, so going to ask the
same round of questions until I get the proper answers from you.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

envynicky

unread,
Jul 21, 2011, 8:46:17 AM7/21/11
to pik help and suggestions
Hello,

Sorry for coming back late, was sort of engaged.

I tried to go the way you suggested i.e. did cd ~ and then pwd and got
the results which is same as $HOME.
but in this path I was not able to find any .profile file and not is
it allowing me to add one without a file name. need your help on this.

Secondly when i am doing echo $HOME_TOOLS, I am getting an blank line
while the answer to $HOME is correct. please guide me on this aspect
as well.

Thanks

On Jul 8, 5:47 pm, Luis Lavena <luislav...@gmail.com> wrote:
> Hello,
>
> Please respond to the group, so all benefit with the answers.
>

Luis Lavena

unread,
Jul 22, 2011, 10:14:29 AM7/22/11
to pik help and suggestions
On Jul 21, 9:46 am, envynicky <verman...@gmail.com> wrote:
> Hello,
>
> Sorry for coming back late, was sort of engaged.
>
> I tried to go the way you suggested i.e. did cd ~ and then pwd and got
> the results which is same as $HOME.
> but in this path I was not able to find any .profile file and not is
> it allowing me to add one without a file name. need your help on this.
>

You need an editor, Notepad isn't an editor.

You can create the file from inside cygwin with "touch .profile" and
then tell notepad to edit it.

> Secondly when i am doing echo $HOME_TOOLS, I am getting an blank line
> while the answer to $HOME is correct. please guide me on this aspect
> as well.
>

$HOME_TOOLS is something in my environment, it might not work on your
unless you set it.

It is not clear to me the reason you're using cygwin if you're not
familiar enough with Bash and friends.

Why don't use plain command line and set HOME environment variable in
your system preferences?

--
Luis Lavena
Reply all
Reply to author
Forward
0 new messages