this is the first time i am doing this, but after following the instructions online for cocoa pods it seems like I can't use it after installing. Can someone please help?
Ronalds-Air:~ ronaldm$ gem install cocoapods --user-install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Users/ronaldm in PATH, mode 040707
Fetching: cocoapods-1.0.1.gem (100%)
WARNING: You don't have /Users/ronaldm/.gem/ruby/2.0.0/bin in your PATH,
gem executables will not run.
Successfully installed cocoapods-1.0.1
Parsing documentation for cocoapods-1.0.1
1 gem installed
and then I tried this way
Ronalds-Air:~ ronaldm$ /Users/ronaldm/.gem/ruby/2.0.0/bin/pod install
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15/rbconfig.rb:213: warning: Insecure world writable dir /Users/ronaldm in PATH, mode 040707
[!] No `Podfile' found in the project directory.
and I tried sudo but that didn't help, any help would be ver much appreciated
The error won't stop you from adding dependencies to your iOS, but it will stop you from being able run any gem executables.
Add the following line at the bottom of your ~/.bash_profile (or create it, if it doesn't exist)
export PATH="~/.gem/ruby/2.0.0/bin:$PATH"
Related
I'm working on a Ruby project that requires the use of a few gems. I'm a bit confused, since I thought I already had bundler installed on my Mac. I tried installing it just now and got the following error:
Leias-MacBook-Pro:spec leia$ gem install bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
I then tried using --user-install, a trick I picked up from browsing Stack Overflow.
Leias-MacBook-Pro:spec leia$ gem install bundler --user-install
WARNING: You don't have /Users/leia/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run.
Successfully installed bundler-2.0.2
Parsing documentation for bundler-2.0.2
Done installing documentation for bundler after 5 seconds
1 gem installed
Now, I kind of need the gem executables to run, so I opened my .bash_profile and dropped the following code in:
export PATH=/Users/leia/.gem/ruby/2.3.0/bin:$PATH
But no matter how I try to fix it, bundle still won't run. The gem I'm installing is rspec, and I definitely need to be able to run those executables. Am I doing something wrong here? I've tried to follow tutorials and Google similar issues, but I can't figure out what the problem is. Any pointers or suggestions?
I tried to install this starter project: https://github.com/shakyShane/jekyll-gulp-sass-browser-sync
I have the latest Ruby and Node.js installed. I followed the setup instructions for this starter project: installed jekyll, gulp, ran the npm install command and after that gulp. And when I ran gulp I got this error message:
Dependency Error: Yikes! It looks like you don't have pygments
or one of its dependencies installed. In order to use Jekyll as currently configured, you'll
need to install this gem. The full error message from Ruby is:
'cannot load such file -- pygments' If you run into trouble, you can find helpful resources
at http://jekyllrb.com/help/!
Liquid Exception: pygments in C:/work/Web/MySite/_posts/2014-04-20-welcome-to-jekyll.markdown
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
pygments
I tried to install pygments manually: gem install pygments.rb, but it didn't help.
I'm new to Ruby and Jekyll... What went wrong here and how can it be fixed?
UPDATE
This is the error message from gem install pygments.rb:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing pygments.rb:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160811-6768-1qhknd7.rb extconf.rb
creating Makefile
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
make "DESTDIR=" clean
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
make "DESTDIR="
generating yajl-x64-mingw32.def
compiling yajl.c
yajl.c: In function 'yajl_status_to_string':
yajl.c:61:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
...more of these yajl_... visibility attribute not supported messages...
c:/ruby23-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o: file not recognized: File trun
cated
collect2.exe: error: ld returned 1 exit status
make: *** [yajl.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/yajl-ruby-1.2.1/gem_make.out
OK, after a very long time I finally found a solution to the problem I had. Here's what I did:
Completely uninstalled all gems.
Uninstalled Ruby DevTools
Uninstalled Ruby
Re-installed Ruby
Re-installed Ruby DevTools (downloaded it again, apparently my previous download had corrupted files) , changed config.yml to include - C:/Ruby23-x64
Re-installed pygments.rb (this time it went well, without any errors)
Installed Python (very important)
Edited Gulp's _config.yml and changed default highlighter from pygments to rouge
Installed redcarpet gem gem install redcarpet
Ran gulp again and this time it finally worked as expected!
When I try to install bropages on Mavericks, I get:
$ gem install bropages
Building native extensions. This could take a while...
ERROR: Error installing bropages:
ERROR: Failed to build gem native extension.
No such file or directory # dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext
Gem files will remain installed in /Users/christian/.gem/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0- static/unf_ext-0.0.6/gem_make.out
And then:
$ cat /Users/christian/.gem/extensions/x86_64-darwin-13/2.2.0-static/unf_ext-0.0.6/gem_make.out
No such file or directory # dir_chdir - /Users/christian/.gem/gems/unf_ext-0.0.6/ext/unf_ext
I'm using ruby 2.2.1 and gem 2.4.5, both managed with rbenv. Any idea what could cause this?
Have you tried it with sudo, I am running into the same issues as you, but my errors mentioned permissions, so I am going to go with sudo. It is strange, as I had it installed once before, and now it no longer seems to be there.
Make sure you've installed the Xcode Command Line Tools, which brings with it a bunch of utilities, including what you need to build a gem module.
xcode-select --install
After you've installed the package, give the install another go.
I guess you are using a .gemrc in your home directory, where you specify the gemhome. Instead of using a ~ for your home directory you should enter the complete path. In your example it should look as follow:
$ cat ~/.gemrc
gemhome: /Users/christian/.gem/
There must be some inconsistency between the ruby/gem tools. If you use a ~ in .gemrc, a subdirectory called /current/working/directory/~/.gem is created, while the extensions are put into your homes /home/user/.gem/ directory.
I am trying to learn sass so I can develop my front end skills a little bit more because that is what I hope to be some day. The only thing is I can't get sass to work.
Whenever I run the sass --watch . command it returns this error.
>>> Sass is watching for changes. Press Ctrl-C to stop.
write ./test.css
LoadError: no such file to load -- rb-fsevent
Use --trace for backtrace.
I did a bit of research on this error and it was suggested on this site to just simply install the rb-fsevent file that is missing so I ran the gem install rb-fsevent command and then got this error.
Fetching: rb-fsevent-0.9.4.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
so I did a bit of research on THIS error and it was suggested agin on this site to just run the install with sudo. So i did just that I didn't get an error so i was quite excited because I have been fighting with this for a while so i want back to the start of this question and ran the --watch command and got the same exact error. Can anyone help me fix this?
Your first error is because Ruby can't load the rb-fsevent gem. This could be because the gem is not installed. Trying to install the gem was a good idea.
Your second error is because you are trying to install the gem to a directory that you do not have permissions for. Using sudo to do the install is an acceptable solution. You can also do gem install --user-install to install to your home directory.
You are still getting the first error because even though the gem is installed, Ruby cannot load it. This could be because sudo installed the gem with the wrong permissions, or installed it to the wrong location, or Ruby is looking for it in the wrong location.
Thus your solution would be to
Locate the gem files you installed
Check that their permissions allow you to read them
Check ruby -e 'p $LOAD_PATH' to see if Ruby is looking in the right place for the gem
Gosu fails to install on my Mountain Lion (10.8.3).
Here's the error I get:
Building native extensions. This could take a while...
ERROR: Error installing gosu:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/jlnr/gosu/wiki/Getting-Started-on-Linux
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:338:in `symlink': File exists - ../linux/gosu.bundle or ../lib/gosu.bundle (Errno::EEXIST)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:338:in `ln_s'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1418:in `fu_each_src_dest0'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
from extconf.rb:99
What I tried so far:
Checked that I've got Command line tools installed in My XCode. This guy had same problem. But we evidently have different source(s) of problem(s).
Tried installing dependencies from the rubygame website, appearently helped this guy. Installed the libraries like this guy.
Changed the path to put /usr/local/bin in front of /usr/bin/. That didn't help either.
Tried to install Rubygame gem : And same problem!
Tried to install SDL gem : Same problem!
So I decided to try to install something different: the Cake gem. It worked!
I decided to give up and ask the question in stackoverflow.
I typed my problem in stackoverflow.
So what could the problem be?
I had a similar issue. After tinkering in my Path forever, I downloaded and ran Jewelrybox. Afterwards, I had it reinstall ruby-1.9.3 -p448, during which it ran diagnostics. Thankfully was able to install gosu after that.
Try that out, hopefully it works for you too.