4

I'm trying to install cocoapods and do the setup for my ios project.

However, after I install with the following command:

$ sudo gem install cocoapods 

I tried to run the command below but it gives "command not found" error.

$ pod setup 

I was using rvm long time ago with my ruby project, so I also updated the version of rvm.

I also searched the install location with this command:

find /usr -name "pod" 

and here are the locations for cocoapods files:

/usr/local/rvm/rubies/rbx-head/gems/1.8/bin/pod /usr/local/rvm/rubies/rbx-head/gems/1.8/gems/cocoapods-0.32.1/bin/pod /usr/local/rvm/rubies/rbx-head/gems/1.8/gems/cocoapods-try-0.2.0/lib/pod 

But in my .bash_profile I have the following line:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. 

I tried almost every suggestions from either stackoverflow or any other website but I couldn't manage to setup it.

That would be great if you can help me.

Thanks!

1
  • 1
    This question seems to have nothing to do with RestKit Commented May 1, 2014 at 19:20

1 Answer 1

2

After couple of hours, I finally overcame the issue.

In my opinion that problem occurs when we have different path and different versions of ruby.

I wasn't using mac's own ruby. (You can check it by writing "which ruby" to your console, the result should be "/usr/bin/ruby" if you haven't defined any other path.)

Hence I removed all of the ruby versions from my rvm.

After that, I also deleted the below line from my .bash_profile file.

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. 

I hope it will help you as well.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.