shell environment is not what I expected

202 views
Skip to first unread message

Kurt

unread,
Aug 2, 2015, 1:59:43 PM8/2/15
to Xiki
running a rake task from within Xiki, using something like

$rspec ./spec/some/great/testcase.rb

it is not picking up the gems (via bundler)

So, I'm guessing this is not running in the same environment that my shell defaults.

Kurt

unread,
Aug 2, 2015, 4:39:43 PM8/2/15
to Xiki
Presumably this is running the external commands in bash? Is there a way to set it to run them in the same shell I normally use? (zsh)

Kurt

unread,
Aug 2, 2015, 8:01:22 PM8/2/15
to Xiki
So... more on this. Appears to just be a problem getting rvm in place when using xsh to execute something.

(experienced the same thing when trying to execute these tasks directly from vim, and the solution there was to add  set shell=/bin/sh in .vimrc, but clearly that doesn't work for xsh)

I have this line in .bash_profile, .bashrc, and now in .profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Still, can't get xiki to execute a rake task.



On Sunday, August 2, 2015 at 10:59:43 AM UTC-7, Kurt wrote:

Steve Baker

unread,
Aug 2, 2015, 10:11:23 PM8/2/15
to Xiki
If it's a shell script, shouldn't it start with

  #!/bin/csh

...or whichever shell you need it to run?

  -- Steve

Kurt

unread,
Aug 3, 2015, 9:52:37 PM8/3/15
to Xiki
Possibly this is actually an rvm issue... not sure.

It appears that when executing a task in xsh of the form

   $ rake some_rake_task

rvm is trying to get the global gemset rather than the one defined in  .ruby_gemset (also seems to ignore .ruby-version)


Also, I can get this:

Warning! PATH is not properly set up, '/Users/me/xiki/misc/gems//bin' is not available.

Why this is going there rather than the correct rvm path under ~/.rvm I don't know.


It's as if something in xsh is avoiding loading .bash_profile or one of the other dotfiles 
Reply all
Reply to author
Forward
0 new messages