Can anyone help me get Jekyll installed? - jekyll

Apparently I can this error if I use 'sudo gem install jekyll' or 'gem install jekyll'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/antonioortiz/.rvm/gems/ruby-1.9.3-p448/gems/ffi-1.9.3/ffi.gemspec
Appreciate the help!

Check folder permission, chmod to 755.

Related

Errno::EACCES: Permission denied # rb_sysopen

when I try to run gem install json -v 1.8.3
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /home/ulap10/.gem/gems/json-1.8.3/tests/test_json.rb
I tried to fix this by reclaiming ownership using - sudo chown -R ulap10 /home/ulap10/.gem/gems/json-1.8.3/tests/test_json.rb but it didn't work.
How can I resolve this?

write permissions when installing Jekyll on OS X High Sierra 10.13.1

Everything was working fine before I updated to High Sierra, now jekyll won't run. I uninstalled jekyll, made sure ruby was updated using brew (says ruby 2.4.2_1 is already installed) and and then tried to reinstall jekyll. this is the error I get from the command line.
Last login: Sat Dec 9 20:15:25 on ttys000
Wills-MBP:~ Will$ sudo gem uninstall jekyll
Password:
Gem 'jekyll' is not installed
Wills-MBP:~ Will$ gem install bundle
Fetching: bundle-0.0.1.gem (100%)
Successfully installed bundle-0.0.1
Parsing documentation for bundle-0.0.1
Installing ri documentation for bundle-0.0.1
Done installing documentation for bundle after 0 seconds
1 gem installed
Wills-MBP:~ Will$ gem install jekyll
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen -
/Library/Ruby/Gems/2.3.0/gems/jekyll-3.6.2/.rubocop.yml
Wills-MBP:~ Will$ sudo gem install jekyll
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
Wills-MBP:~ Will$ sudo gem install jekyll bundler
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
Wills-MBP:~ Will$ gem update --system
Updating rubygems-update
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
Wills-MBP:~ Will$
I have located the files in question but I cannot give myself write permission with the security features of the OS.
So as of right now, jekyll is not installed, I just want to re-install it and get everything up and running again.
Does anyone know how to fix this?
**Quick note, here is what I get when I run these commands...
Wills-MBP:~ Will$ which ruby
/usr/bin/ruby
Wills-MBP:~ Will$ which gem
/usr/bin/gem
So I guess this means its getting pointed to my system, instead of /usr/local. How do I change this?
I figured it out! I found my answer here. https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#laptop-script
While following the steps listed I ran the command
brew doctor
this gave me the error "Warning: /usr/bin occurs before /usr/local/bin"
so I ran the command provided by the troubleshooting guide https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/#troubleshoot-brew
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
make sure you quit terminal and restart it.
After that I did not follow any more steps in the guide, simply ran
gem install jekyll bundler
everything installed correctly and it's good to go!
I had the same system error after updating to Mac OSX High Sierra (10.13.4; though I don't know that the update is related)
Permission denied # rb_sysopen
and found that running:
sudo gem install jekyll
then entering your password, would finish the Jekyll install.
Credit to this solution goes to Alexander Davison at TeamTreeHouse.com

Resolve error: An error occurred while installing mysql2 (0.4.5), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.4.5'`

I am trying to build a docker image by running the command:
docker build -t user:repository .
and keep getting this error:
An error occurred while installing mysql2 (0.4.5), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.4.5'` succeeds before bundling.
The command '/bin/sh -c /bin/bash -l -c "gem install bundler && bundle install"' returned a non-zero code: 5
What I've Tried
gem install mysql2 -v '0.4.5'`
gets an error
ERROR: Could not find a valid gem 'mysql2' (= 0.4.5), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
and after running the suggestion from this repo and this website I get the error:
Could not find a valid gem 'C:rubygems-update-2.6.7.gem' (>= 0) in any repository
I am stuck at this point for I have no idea where this problem stems from. Any help would be very much appreciated.
When I run bundle update I get an
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about
OpenSSL certificates, see. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
try to run bundle update. I had a similar problem and that worked for me... good luck!
A Dockerfile would be useful here, but let's take a random stab.
If you use ubuntu, the base install does not include any ca certificates so SSL does not work properly. Try installing the packages 'ssl' and 'ca-certificates'.

gulp command line installation

I tried installing gulp via cmd on my mac but and used
nmp install gulp-cli --global
but couldn't install, instead it throws a permission denied error as show in the image below. Any suggestions?
http://i.stack.imgur.com/dO91r.png
It's all about permission problem. You can try,
sudo npm install -g gulp-cli--global --allow-root

Problem with rake db:migrate

When I try rake db:migrate, I get the following error:
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load -- mysql
And when I try to "gem install mysql"
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
Can't find header files for ruby.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
I checked the rubygems folder and mysql gem has been installed. Any ideas? Cheers
This should sort it out on Ubuntu:
sudo aptitude install libmysqlclient-dev build-essential
Then install the gem again. You may need to delete the /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 folder if it craps out.
I hope that helps.
The gem hasn't actually been installed. You are missing either the ruby development files, mysql developer files, or linux build essentials. Since you are asking, I'll assume you are on a linux distribution with a package manager; install the corresponding packages.
As Sleepycat suggested, most probably you need the dev libraries for MySQL.
On Fedora / CentOS this should solve your problem:
yum install mysql-devel
gem install mysql