Slather command not found error after successful installation. I have updated the commands used in Terminal. Can anyone help to identify the missing flags or setting?
MacBook-Pro-5:DemoAPP mackbook$ gem install slather
Successfully installed slather-2.7.2
Parsing documentation for slather-2.7.2
Done installing documentation for slather after 0 seconds
1 gem installed
MacBook-Pro-5:DemoAPP mackbook$ slather
**-bash: slather: command not found**
A bit like in this question, check your gem environment, gem env and your $PATH
Look for the executable slather in one of the gem paths, and make sure the full path is referenced in your current $PATH.
Related
I'm trying to get the coverage result of the tests for IOS. I use the slather coverage command. But I keep getting the error
/Users/bamboo/.gem/bin/slather: /Users/bamboo/.rbenv/versions/3.1.0/bin/ruby: bad interpreter: No such file or directory
When I run the whereis ruby command on the agent, I see the following result
ruby: /usr/bin/ruby /usr/share/man/man1/ruby.1
Could you please write me how to change the path to ruby for slather from the task Bamboo pipeline? Thanks.
Looks like ruby 3.1.0 has not been installed with rbenv on your system yet.
Run:
rbenv install 3.1.0
bundle install in your project directory if there is a Gemfile
slather coverage.
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'm not well versed in terminal, but I'll try my best to make this as clear and concise as I can.
I'm trying to install SASS and get the following errors:
When using gem install sass I get .
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
When using sudo gem install sass I get .
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
I have Xcode installed and I have agreed to the terms.
I even tried updating my Ruby, but terminal tells me I already have the most updated version.
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
The worst part of all of this is that when I navigate to my Ruby/Gems/2.3.0/gems directory, there is a sass-3.5.5 folder!!! (linked image to follow)
Ruby directory path to sass folder
I try running sass -v and get -bash: sass: command not found
I feel like I've tried everything that I can think of or find online. I'm at a loss and definitely need some help.
The issue can be fixed by installing RVM or Rbenv for managing ruby versions and gems.
Also, FilePermissionError can be fixed using the -n parameter
sudo gem install sass -n /usr/bin
I prefer not touching sudo command, so I managed to solve this issue by referring to SASS home page:
If you use Node.js, you can also install Sass using npm by running
npm install -g sass
If you find it helpful, kindly upvote or leave comment so that I know it can solve your issues too.
Or one could update the directory for where gems are installed.
Please see the origional answer here: https://stackoverflow.com/a/2619731/3302764
export GEM_HOME=~/.gem
export GEM_PATH=~/.gem
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.
Found today I couldn't get my 'jekyll server' to start, so I preceded to reinstall 'jekyll' but I get this error...
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
Then I tried 'sudo gem install jekyll' and it worked!
Can anyone explain what's going on?
Thanks!
Use rbenv to setup a ruby binary that is in your home dir (a writable path).
You get that error because you lack write permissions to the System dir. Don't try to get write perms there - that's just asking for trouble. Instead, install a ruby version manager.
rbenv is linked above. Some like RVM. You can google for the arguments that pro/con each. rbenv is "more unix-like" and that is a good reason on its own.
It is installing system wide , you can force a single user install as follow
gem install jekyll --user-install