rayh / xcoder

ruby wrapper for Xcode build tools to aid automating builds
MIT License
412 stars 70 forks source link

xcoder - command not found #61

Closed xslim closed 11 years ago

xslim commented 11 years ago

I'm getting

% xcoder
zsh: command not found: xcoder

I've installed xcoder gem using gem install xcoder, and also tried installing from latest source - same issue.

orkoden commented 11 years ago

Actually none of my previous suspicions were true. gem install xcoder will install 0.1.15, which does not include the xcoder tool. As xcoder is currently marked as work in progress I would not rely on it too much atm.

I installed the current development version 0.1.17 from here and it will install the xcoder command correctly. The problem is that the README.md is for 0.1.17 or newer and rubygems installs 0.1.15.

Installation works as follows

  1. Clone the repository locally or download the zip
  2. Open a terminal and cd to the xcoder folder you just downloaded.
  3. Type rake doc:generate to generate the documentation.
  4. Type rake to generate the .gem file.
  5. Type gem install pkg/xcoder-0.1.17.gem to install the gem.
  6. You can now delete the downloaded repository if you want to.

Now you can run xcoder from the command line.

orkoden commented 11 years ago

For an even shorter installation run rake install. That will generate docs, create the gemfile and install the gem.

xslim commented 11 years ago

I still have the problem

As you see, the xcoder is not installed to the bin folder

% cd ~/src/gems/xcoder 
Using /Users/slim/.rvm/gems/ruby-1.9.3-p194 with gem set xcoder

gems/xcoder % git pull
Already up-to-date.

gems/xcoder % rake install
xcoder 0.1.17 built to pkg/xcoder-0.1.17.gem
xcoder (0.1.17) installed

% cd /
% rehash
% xcoder
zsh: command not found: xcoder

% ls /Users/slim/.rvm/gems/ruby-1.9.3-p194/bin | grep xc
xcodeproj
xslim commented 11 years ago

OK, I found the problem. It's in RVM. When I enter the xcoder folder, rvm starts using the xcoder gemset

% cd ~/src/gems/xcoder 
Using /Users/slim/.rvm/gems/ruby-1.9.3-p194 with gemset xcoder

so if I will force RVM to use the default one

% rvm use
Using /Users/slim/.rvm/gems/ruby-1.9.3-p194

Then, after installation, the xcoder is properly copied to the bin folder

xslim commented 11 years ago

https://github.com/rayh/xcoder/blob/master/.rvmrc#L1

This line caused the problem

orkoden commented 11 years ago

I installed ruby1.9.3 using homebrew. Great that you could figure it out.

rayh commented 11 years ago

Hmm, perhaps the .rvmrc shouldn't be committed? any suggestions? if someone has a PR that fixes this, that'll be great. I'd like to describe a dependency on 1.9.3 though.

As for the docs vs current release, yes, that is a bit dumb. I think I'll clarify the docs that it is only available in HEAD

On 10 April 2013 23:37, Jörg Bühmann notifications@github.com wrote:

I installed ruby1.9.3 using homebrew. Great that you could figure it out.

— Reply to this email directly or view it on GitHubhttps://github.com/rayh/xcoder/issues/61#issuecomment-16174433 .

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 | http://ray.sh

xslim commented 11 years ago

You can describe the dependance on 1.9.3 in .rvmrc but omit there the 'xcoder' name, to stick to 'system'

Sent from my iPad

On 13 apr. 2013, at 03:14, Ray Yamamoto Hilton notifications@github.com wrote:

Hmm, perhaps the .rvmrc shouldn't be committed? any suggestions? if someone has a PR that fixes this, that'll be great. I'd like to describe a dependency on 1.9.3 though.

As for the docs vs current release, yes, that is a bit dumb. I think I'll clarify the docs that it is only available in HEAD

On 10 April 2013 23:37, Jörg Bühmann notifications@github.com wrote:

I installed ruby1.9.3 using homebrew. Great that you could figure it out.

— Reply to this email directly or view it on GitHubhttps://github.com/rayh/xcoder/issues/61#issuecomment-16174433 .

Ray Hilton

(maker of mobile apps)

13/243 Collins St, Melbourne VIC 3000 | +61 (0) 430 484 708 | http://ray.sh — Reply to this email directly or view it on GitHub.

rayh commented 11 years ago

Ok, so is this issue still valid?

I think I will leave the .rvmrc as is, since it is just for development and expect people to modify this along with any other files to get things working. If I use 'system', then this might work for some people, but would be quite annoying for people trying to keep their rubys/gems compartmentalised.