Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

4 votes
1 answers
3860 views
Gem install producing "OpenSSL" error
For at least a week now i have been trying to install Bettercap on my Raspberry PI using gem but whenever i type in: sudo gem install bettercap i receive an error message that says ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred)...
For at least a week now i have been trying to install Bettercap on my Raspberry PI using gem but whenever i type in: sudo gem install bettercap i receive an error message that says ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources Every fix that has been suggested to other people yields no results: **Option 1: "http option"** According to the answer by Filippo De Bortoli in this thread on the same issue, disabling the https protocol will solve it. However after running these commands: gem source -r https://rubygems.org/ gem source -a http://rubygems.org/ I still get this error: ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources **Option 2: rebuild** As suggested by Filippo De Bortoli in the same thread he reinstalled ruby after installing OpenSSL, however my raspbian came with OpenSSL and running sudo apt-get install openssl only confirms i have the latest version. I have also re-built ruby 3 times since i started getting this. **Option 3: install locally** After finding out that you could install the gems locally i installed the source and ran. sudo gem install --local bettercap-1.6.2b.gem and got the output: ERROR: Could not find a valid gem 'em-proxy' (>= 0.1.8, ~> 0.1) in any repository I am guessing since it is only searching the local disk it can not find the dependencies it needs, so i decided to locally install "em-proxy" only to find it needed dependencies, which also needed dependencies. Great. So i decided to leave it for the sake of my sanity and it was overall impractical. ---------- To wrap up, **how do i get rid of this error or at the very least bypass it?** Just in case you wanted to know here is the output of gem -v: 2.4.5 and the output of ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [armv6l-linux-eabihf]
aidan (41 rep)
Jul 29, 2017, 08:37 PM • Last activity: Jun 19, 2025, 02:06 AM
0 votes
0 answers
37 views
Ruby GEM nokogiri does not build on Rocky 9 Linux due to missing XML libraries even though packages are installed
I have a Rocky 9 host with multiple versions of Ruby installed using rbenv. # rbenv versions * system (set by /usr/local/rbenv/version) 2.4.1 2.7.1 2.7.6 The *system version of Ruby is 3.0.7p220. As part of my deployment of a Ruby (2.4.1) on Rails app, I can see the following errors when attempting...
I have a Rocky 9 host with multiple versions of Ruby installed using rbenv. # rbenv versions * system (set by /usr/local/rbenv/version) 2.4.1 2.7.1 2.7.6 The *system version of Ruby is 3.0.7p220. As part of my deployment of a Ruby (2.4.1) on Rails app, I can see the following errors when attempting to build and install nokogiri defined in a Gemfile: checking if the C compiler accepts ... no Building nokogiri using system libraries. pkg-config could not be used to find libxml-2.0 Please install either pkg-config or the pkg-config gem per gem install pkg-config -v "~> 1.1.7" pkg-config could not be used to find libxslt Please install either pkg-config or the pkg-config gem per gem install pkg-config -v "~> 1.1.7" pkg-config could not be used to find libexslt Please install either pkg-config or the pkg-config gem per gem install pkg-config -v "~> 1.1.7" ERROR: cannot discover where libxml2 is located on your system. please make sure pkg-config is installed. *** extconf.rb failed *** However, if I run the following, I can see the first 3 libraries are installed. # pkg-config --exists libxml-2.0 && echo "Package exists" || echo "Package not found" Package exists # pkg-config --exists libxslt && echo "Package exists" || echo "Package not found" Package exists # pkg-config --exists libexslt && echo "Package exists" || echo "Package not found" Package exists pkg-config does seem to find libxml2: # pkg-config --exists libxml2 && echo "Package exists" || echo "Package not found" Package not found The packages already installed are: # rpm -qa libxml2-devel libxslt-devel libxml2 libxml2-2.9.13-6.el9_5.2.x86_64 libxml2-devel-2.9.13-6.el9_5.2.x86_64 libxslt-devel-1.1.34-9.el9_5.1.x86_64 Any idea what I am missing?
Confounder (131 rep)
Mar 28, 2025, 05:30 PM • Last activity: Mar 28, 2025, 11:40 PM
0 votes
1 answers
133 views
Arch linux: gem update
when I try to update my gems on my system using `gem update` I get this error: ``` /usr/lib/ruby/3.3.0/rdoc/version.rb:8: warning: already initialized constant RDoc::VERSION /home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/version.rb:8: warning: previous definition of VERSION was here...
when I try to update my gems on my system using gem update I get this error:
/usr/lib/ruby/3.3.0/rdoc/version.rb:8: warning: already initialized constant RDoc::VERSION
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/version.rb:8: warning: previous definition of VERSION was here
/usr/lib/ruby/3.3.0/rdoc.rb:70: warning: already initialized constant RDoc::VISIBILITIES
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:68: warning: previous definition of VISIBILITIES was here
/usr/lib/ruby/3.3.0/rdoc.rb:76: warning: already initialized constant RDoc::DOT_DOC_FILENAME
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:74: warning: previous definition of DOT_DOC_FILENAME was here
/usr/lib/ruby/3.3.0/rdoc.rb:81: warning: already initialized constant RDoc::GENERAL_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:79: warning: previous definition of GENERAL_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:86: warning: already initialized constant RDoc::CLASS_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:84: warning: previous definition of CLASS_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:91: warning: already initialized constant RDoc::ATTR_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:89: warning: previous definition of ATTR_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:96: warning: already initialized constant RDoc::CONSTANT_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:94: warning: previous definition of CONSTANT_MODIFIERS was here
/usr/lib/ruby/3.3.0/rdoc.rb:101: warning: already initialized constant RDoc::METHOD_MODIFIERS
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc.rb:99: warning: previous definition of METHOD_MODIFIERS was here
Updating installed gems
Updating bundler
Fetching bundler-2.6.3.gem
Successfully installed bundler-2.6.3
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:36: warning: already initialized constant RDoc::RDoc::GENERATORS
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:36: warning: previous definition of GENERATORS was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:41: warning: already initialized constant RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:41: warning: previous definition of UNCONDITIONALLY_SKIPPED_DIRECTORIES was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:46: warning: already initialized constant RDoc::RDoc::TEST_SUITE_DIRECTORY_NAMES
/usr/lib/ruby/3.3.0/rdoc/rdoc.rb:46: warning: previous definition of TEST_SUITE_DIRECTORY_NAMES was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:64: warning: already initialized constant RDoc::Generator::Darkfish::BUILTIN_STYLE_ITEMS
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:64: warning: previous definition of BUILTIN_STYLE_ITEMS was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:80: warning: already initialized constant RDoc::Generator::Darkfish::GENERATOR_DIR
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:80: warning: previous definition of GENERATOR_DIR was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:85: warning: already initialized constant RDoc::Generator::Darkfish::VERSION
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:85: warning: previous definition of VERSION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:90: warning: already initialized constant RDoc::Generator::Darkfish::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:90: warning: previous definition of DESCRIPTION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/darkfish.rb:637: warning: already initialized constant RDoc::Generator::Darkfish::SVNID_PATTERN
/usr/lib/ruby/3.3.0/rdoc/generator/darkfish.rb:637: warning: previous definition of SVNID_PATTERN was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/ri.rb:12: warning: already initialized constant RDoc::Generator::RI::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/ri.rb:12: warning: previous definition of DESCRIPTION was here
/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/generator/pot.rb:63: warning: already initialized constant RDoc::Generator::POT::DESCRIPTION
/usr/lib/ruby/3.3.0/rdoc/generator/pot.rb:63: warning: previous definition of DESCRIPTION was here
Parsing documentation for bundler-2.6.3
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby -c lib/bundler.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(ArgumentError) wrong number of arguments (given 4, expected 5)

ERROR:  While executing gem ... (ArgumentError)
    wrong number of arguments (ArgumentError)
	/usr/lib/ruby/3.3.0/rdoc/parser.rb:167:in `for'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:359:in `parse_file'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:415:in `block in parse_files'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:413:in `map'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rdoc.rb:413:in `parse_files'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:202:in `block in generate'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:201:in `chdir'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:201:in `generate'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:62:in `block in generate'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:61:in `each'
	/home/john/.local/share/gem/ruby/3.3.0/gems/rdoc-6.9.0/lib/rdoc/rubygems_hook.rb:61:in `generate'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:313:in `block in install_hooks'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `each'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `install_hooks'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:210:in `install'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/dependency_installer.rb:250:in `install'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:248:in `update_gem'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:260:in `block in update_gems'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:259:in `each'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:259:in `update_gems'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/commands/update_command.rb:120:in `execute'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/command.rb:326:in `invoke_with_build_args'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:253:in `invoke_command'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:194:in `process_args'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:152:in `run'
	/usr/lib/ruby/site_ruby/3.3.0/rubygems/gem_runner.rb:57:in `run'
	/sbin/gem:12:in `'
I am using gem 3.5.23 and `ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux] ` Thank you for help
Jan Černý (1723 rep)
Jan 17, 2025, 11:40 PM • Last activity: Jan 17, 2025, 11:40 PM
0 votes
1 answers
1512 views
Unable to install pg gem on CentOS Linux release 7.6.1810
ruby --version ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] gem --version 3.3.7 `PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit` When I run env ARCHFLAGS="-arch x86_64" gem install pg according to [this][1], I get Buildi...
ruby --version ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] gem --version 3.3.7 PostgreSQL 9.2.24 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit When I run env ARCHFLAGS="-arch x86_64" gem install pg according to this , I get Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.3.5/ext /root/.rbenv/versions/3.1.2/bin/ruby -I /root/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20220601-102563-hl61l1.rb extconf.rb Calling libpq with GVL unlocked checking for pg_config... yes Using config values from /bin/pg_config Using libpq from /usr/lib64 checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... no checking for PQconnectdb() in -llibpq... no checking for PQconnectdb() in -lms/libpq... no Can't find the PostgreSQL client library (libpq) ***************************************************************************** Unable to find PostgreSQL client library. Please install libpq or postgresql client package like so: sudo apt install libpq-dev sudo yum install postgresql-devel sudo zypper in postgresql-devel sudo pacman -S postgresql-libs or try again with: gem install pg -- --with-pg-config=/path/to/pg_config or set library paths manually with: gem install pg -- --with-pg-include=/path/to/libpq-fe.h/ --with-pg-lib=/path/to/libpq.so/ *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/root/.rbenv/versions/3.1.2/bin/$(RUBY_BASE_NAME) --with-pg --without-pg --enable-gvl-unlock --disable-gvl-unlock --enable-windows-cross --disable-windows-cross --with-pg-config --without-pg-config --with-pg_config --without-pg_config --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pq-dir --without-pq-dir --with-pq-include --without-pq-include=${pq-dir}/include --with-pq-lib --without-pq-lib=${pq-dir}/lib --with-pqlib --without-pqlib --with-libpq-dir --without-libpq-dir --with-libpq-include --without-libpq-include=${libpq-dir}/include --with-libpq-lib --without-libpq-lib=${libpq-dir}/lib --with-libpqlib --without-libpqlib --with-ms/libpq-dir --without-ms/libpq-dir --with-ms/libpq-include --without-ms/libpq-include=${ms/libpq-dir}/include --with-ms/libpq-lib --without-ms/libpq-lib=${ms/libpq-dir}/lib --with-ms/libpqlib --without-ms/libpqlib To see why this extension failed to compile, please check the mkmf.log which can be found here: /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/pg-1.3.5/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.3.5 for inspection. Results logged to /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/pg-1.3.5/gem_make.out I have done sudo yum install postgresql-devel Package postgresql-devel-9.2.24-7.el7_9.x86_64 already installed and latest version Nothing to do and curl -I https://rubygems.org/specs.4.8.gz HTTP/1.1 200 Connected HTTP/1.1 200 OK Connection: keep-alive Content-Length: 4701495 ... I have also done yum groupinstall 'Development Tools' What should I do to install pg gem?
nidooooz (57 rep)
Jun 1, 2022, 09:54 AM • Last activity: Aug 9, 2022, 04:47 PM
0 votes
1 answers
1602 views
Ruby version issues
I have been practising setting up a production environment with puppet, and now I'm setting up everything to accommodate HTTP requests with Apache. Since Puppet runs on Ruby, I also need Passenger to get it running, but I can't install it because I keep getting an error saying that I need a fresher...
I have been practising setting up a production environment with puppet, and now I'm setting up everything to accommodate HTTP requests with Apache. Since Puppet runs on Ruby, I also need Passenger to get it running, but I can't install it because I keep getting an error saying that I need a fresher version of Ruby installed. At first this was an actual issue because I'm using a core version of CentOS 6.5 that only comes with Ruby 1.8. I then updated the yum repos, the system itself and did wget to download the current version, configured and installed which gets me to where I stand right now. I installed Gems and tried to get Passenger again but I am faced with the same wall, version problems. Here you can see the installed version of ruby and the issue. [vagrant@puppetmaster ~]$ sudo gem install rack passenger ERROR: Error installing rack: rack requires Ruby version >= 2.2.2. ERROR: Error installing passenger: rake requires Ruby version >= 1.9.3. [vagrant@puppetmaster ~]$ ruby --version ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
Miguel Antunes (11 rep)
Jan 11, 2017, 12:48 PM • Last activity: May 29, 2022, 11:02 AM
0 votes
1 answers
7378 views
Gem::Ext::BuildError: ERROR: Failed to build gem native extension
I have the following Dockerfile: FROM debian:stretch-backports RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ ruby ruby-dev \ curl wget \ gnupg \ git \ ncbi-blast+ zlib1g-dev RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && apt-g...
I have the following Dockerfile: FROM debian:stretch-backports RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ ruby ruby-dev \ curl wget \ gnupg \ git \ ncbi-blast+ zlib1g-dev RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ apt-get update && apt-get install -y --no-install-recommends \ nodejs && \ rm -rf /var/lib/apt/lists/* RUN gem install bundler && \ wget -c https://github.com/wurmlab/sequenceserver/archive/1.1.0.beta12.tar.gz && \ tar xfvz 1.1.0.beta12.tar.gz && \ cd sequenceserver-1.1.0.beta12 && \ npm install && \ bundle instal which caused the following error: ... Installing childprocess 1.0.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.1/ext /usr/bin/ruby2.3 mkrf_conf.rb current directory: /var/lib/gems/2.3.0/gems/childprocess-1.0.1/ext /usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1 /usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError) rake failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.3.0/gems/childprocess-1.0.1 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/childprocess-1.0.1/gem_make.out An error occurred while installing childprocess (1.0.1), and Bundler cannot continue. Make sure that `gem install childprocess -v '1.0.1' --source 'http://rubygems.org/ '` succeeds before bundling. In Gemfile: selenium-webdriver was resolved to 3.142.3, which depends on childprocess What did I miss? Thank you in advance
user977828 (913 rep)
Aug 9, 2019, 11:28 AM • Last activity: Aug 9, 2019, 12:18 PM
0 votes
2 answers
3906 views
Is there a way to use this command without having to type 'y' all the time?
I am trying to remove all ruby gems before uninstalling ruby. The command I am using is: `sudo gem uninstall --all` to achieve this. However, I have to type y continually to remove things. Is there a way I could achieve the same thing without having to type `y` to remove all of the dependencies?
I am trying to remove all ruby gems before uninstalling ruby. The command I am using is: sudo gem uninstall --all to achieve this. However, I have to type y continually to remove things. Is there a way I could achieve the same thing without having to type y to remove all of the dependencies?
Nicholas Adamou (573 rep)
Jun 9, 2016, 12:25 PM • Last activity: Jul 31, 2019, 10:35 PM
2 votes
1 answers
1462 views
mysql2 gem build error when installing redmine
when i tried installing redmine with `bundle install --without development test` I received this build error: Fetching gem metadata from https://rubygems.org/......... Resolving dependencies................................... Installing rake 10.3.2 ...(and so on) Gem::Ext::BuildError: ERROR: Failed...
when i tried installing redmine with bundle install --without development test I received this build error: Fetching gem metadata from https://rubygems.org/ ......... Resolving dependencies................................... Installing rake 10.3.2 ...(and so on) Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/pi/.rubies/ruby-2.1.5/bin/ruby extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. ... Gem files will remain installed in /home/pi/.gem/ruby/2.1.5/gems/mysql2-0.3.17 for inspection. Results logged to /home/pi/.gem/ruby/2.1.5/extensions/armv6l-linux/2.1.0-static/mysql2-0.3.17/gem_make.out An error occurred while installing mysql2 (0.3.17), and Bundler cannot continue. Make sure that gem install mysql2 -v '0.3.17' succeeds before bundling. I've tried reading .gem/ruby/2.1.5/extensions/armv6l-linux/2.1.0-static/mysql2-0.3.17/mkmf.log which is full of gcc code checking output with error messages similar in those present in basic output which I've posted abowe. I've also tried executing command from error message (gem install mysql2 -v '0.3.17') but of course this also failed with same result. What can be the source of those errors? I am rather new to linux environment so I let automats do everything for me and I'm following guides (this one in this case ) Can there be a problem with mysql that is already installed by apt-get along with apache? P.S. It is raspbian/debian distro.
Soul Reaver (159 rep)
Nov 18, 2014, 08:53 PM • Last activity: Mar 25, 2019, 02:50 AM
1 votes
2 answers
2589 views
Ruby gems not recognized in bash script
I have built a node.js app that listens for webhooks. Currently it is used to build a jekyll website. I have configured it on my server and `jekyll build` works perfectly when I run it in the root of my jekyll website (which is sending the hooks). When I run the node.js app over ssh in a shell every...
I have built a node.js app that listens for webhooks. Currently it is used to build a jekyll website. I have configured it on my server and jekyll build works perfectly when I run it in the root of my jekyll website (which is sending the hooks). When I run the node.js app over ssh in a shell everything works fine as well when a git hook is triggered. However, when the node.js app is run from an upstart script (shown below) it doesn't seem to find the gems. It keeps asking for dependencies which I am sure I have installed (globally as well as for my user). Inside the script I have put `echowhich jekyll and this shows that it is indeed pointing to the locally installed jekyll bin: /home/christophe/.gem/ruby/2.0.0/bin/jekyll`. But right below that I execute the jekyll command and it fails: /usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'jekyll' (>= 0) among 31 total gem(s) (Gem::LoadError) from /usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec' from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem' from /home/christophe/.gem/ruby/2.0.0/bin/jekyll:22:in `' How can I execute this bash script to properly execute jekyll? # Upstart # /etc/init/libservice.conf # Task to automatically start the library service. author "Christophe De Troyer" description "Run the githook for the blog." # Path of the configuration files env PROJ="/home/christophe/jekyll-builder" # Configure to run as christophe setuid christophe setgid christophe script export PATH=/home/christophe/.gem/ruby/2.0.0/bin:$PATH cd $PROJ gulp run end script start on startup #Respawn the process if it crashes #If it respawns more than 10 times in 5 seconds stop respawn limit 10 5 # Build script #!/bin/bash ######################## # Parameters from Node # ######################## giturl=$1 reponame=$2 branch=$3 ownermail=$4 reporoot=$5 htmlsink=$6 www=$7 ########## # Script # ########## # Check to see if reponame exists. If not, git clone it if [ ! -d $reporoot ]; then mkdir -p $reporoot git clone $giturl $reporoot fi # Checkout and pull branch. cd $reporoot git checkout $branch git pull origin $branch cd - echo which jekyll jekyll # fails # Run jekyll jekyll build -s $reporoot -d $htmlsink # fails too Update: gem env while logged in as a user: RubyGems Environment: - RUBYGEMS VERSION: 2.0.14 - RUBY VERSION: 2.0.0 (2014-01-12 patchlevel 384) [x86_64-linux-gnu] - INSTALLATION DIRECTORY: /var/lib/gems/2.0.0 - RUBY EXECUTABLE: /usr/bin/ruby2.0 - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /var/lib/gems/2.0.0 - /home/christophe/.gem/ruby/2.0.0 - /usr/share/rubygems-integration/2.0.0 - /usr/share/rubygems-integration/all - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - https://rubygems.org/ gem env from within the script, executed from the node.js app running via upstart gives: RubyGems Environment: - RUBYGEMS VERSION: 2.0.14 - RUBY VERSION: 2.0.0 (2014-01-12 patchlevel 384) [x86_64-linux-gnu] - INSTALLATION DIRECTORY: /var/lib/gems/2.0.0 - RUBY EXECUTABLE: /usr/bin/ruby2.0 - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /var/lib/gems/2.0.0 - /.gem/ruby/2.0.0 - /usr/share/rubygems-integration/2.0.0 - /usr/share/rubygems-integration/all - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - https://rubygems.org/ Notice that the GEM_PATHS is missing the home directory prefix in the second entry. I have tried resolving this by putting env GEM_PATH="/home/christophe/.gem/ruby/2.0.0" in the upstart script but that didnt change anything. In the meanwhile I have solved it by intalling a list of deps manually as root. However, I don't think this is a good approach as the upstart is explicitly running as my user. And secondly, this software needs to run on a server I don't have root permissions on. So I would still like to know a fix. sudo gem install jekyll sudo gem install jekyll-gist sudo gem install jekyll-cite sudo gem install jekyll-scholar sudo gem install addressable -v 2.3.5 sudo gem install yajl-ruby -v 1.2.0 sudo gem install pygments.rb sudo gem install posix-spawn
Christophe De Troyer (246 rep)
Jan 8, 2016, 03:27 PM • Last activity: Jan 19, 2019, 07:02 AM
2 votes
1 answers
8453 views
gem install bundler, bundle not working
So this is a bit weird. Gem works fine. When I go to `gem install bundler`, the system outputs the following: Successfully installed bundler-1.16.2 1 gem installed When I check to see what gems are installed with `gem list` the bundler shows up: *** LOCAL GEMS *** bigdecimal (1.2.0) bundler (1.16.2)...
So this is a bit weird. Gem works fine. When I go to gem install bundler, the system outputs the following: Successfully installed bundler-1.16.2 1 gem installed When I check to see what gems are installed with gem list the bundler shows up: *** LOCAL GEMS *** bigdecimal (1.2.0) bundler (1.16.2) io-console (0.4.2) json (1.7.7) psych (2.0.0) rdoc (4.0.0) and yet when I go to run bundle install, I get the following: bash: bundle: command not found I have tried restarting the system, I have used yum erase gem and then reinstalled it, and I have tried gem install bundler again when it didn't work and I am still getting the same error. I am on CentOS 7.5 Thanks in advance for the help.
thePinochleKid (130 rep)
Jul 2, 2018, 10:12 PM • Last activity: Jul 3, 2018, 12:29 AM
1 votes
0 answers
352 views
Can't install ruby on rails MacOSX
While trying to install ruby on rails with sudo gem install rails I get the following error Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri...
While trying to install ruby on rails with sudo gem install rails I get the following error Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180526-6183-1j8mnb7.rb extconf.rb checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no Building nokogiri using packaged libraries. Using mini_portile version 2.3.0 checking for iconv.h... yes checking for gzdopen() in -lz... yes checking for iconv... yes ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxml2-2.9.7. Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. ************************************************************************ Extracting libxml2-2.9.7.tar.gz into tmp/x86_64-apple-darwin17/ports/libxml2/2.9.7... OK Running 'configure' for libxml2 2.9.7... OK Running 'compile' for libxml2 2.9.7... ERROR, review '/Library/Ruby/Gems/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri/tmp/x86_64-apple-darwin17/ports/libxml2/2.9.7/compile.log' to see what happened. Last lines are: ======================================================================== CCLD libxml2.la CC testdso.lo CCLD testdso.la CC xmllint.o CCLD xmllint ld: warning: ignoring file /usr/local/Cellar/xz/5.2.3/lib/liblzma.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/Cellar/xz/5.2.3/lib/liblzma.dylib Undefined symbols for architecture i386: "_lzma_auto_decoder", referenced from: _xz_head in libxml2.a(xzlib.o) "_lzma_code", referenced from: _xz_decomp in libxml2.a(xzlib.o) "_lzma_end", referenced from: ___libxml2_xzclose in libxml2.a(xzlib.o) "_lzma_properties_decode", referenced from: _is_format_lzma in libxml2.a(xzlib.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [xmllint] Error 1 make: *** [all-recursive] Error 1 make: *** [all] Error 2 ======================================================================== *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME) --help --clean --use-system-libraries --enable-static --disable-static --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --enable-cross-build --disable-cross-build /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:402:in `block in execute': Failed to complete compile task (RuntimeError) from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:in `chdir' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:373:in `execute' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:115:in `compile' from /Library/Ruby/Gems/2.3.0/gems/mini_portile2-2.3.0/lib/mini_portile2/mini_portile.rb:154:in `cook' from extconf.rb:365:in `block (2 levels) in process_recipe' from extconf.rb:257:in `block in chdir_for_build' from extconf.rb:256:in `chdir' from extconf.rb:256:in `chdir_for_build' from extconf.rb:364:in `block in process_recipe' from extconf.rb:262:in `tap' from extconf.rb:262:in `process_recipe' from extconf.rb:551:in `' To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/nokogiri-1.8.2 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/nokogiri-1.8.2/gem_make.out I have checked the mkmf.log: "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -lpthread -ldl -lobjc " ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return 0; 6: } /* end */ "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include -arch x86_64 -arch i386 -c conftest.c" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main() {return 0;} /* end */ "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include -Wno-error=unused-command-line-argument-hard-error-in-future -arch x86_64 -arch i386 -c conftest.c" warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option] 1 warning generated. warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option] 1 warning generated. checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main() {return 0;} /* end */ have_header: checking for iconv.h... -------------------- yes "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include -arch x86_64 -arch i386 -c conftest.c" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include /* end */ -------------------- have_library: checking for gzdopen() in -lz... -------------------- yes "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -lz -lpthread -ldl -lobjc " ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: /*top*/ 6: extern int t(void); 7: int main(int argc, char **argv) 8: { 9: if (argc > 1000000) { 10: printf("%p", &t); 11: } 12: 13: return 0; 14: } 15: int t(void) { void ((*volatile p)()); p = (void ((*)()))gzdopen; return !p; } /* end */ -------------------- have_iconv?: checking for iconv... -------------------- yes "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -lpthread -ldl -lobjc " ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' Undefined symbols for architecture x86_64: "_iconv", referenced from: _main in conftest-8bb26b.o "_iconv_open", referenced from: _main in conftest-8bb26b.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: #include 5: 6: int main(void) 7: { 8: iconv_t cd = iconv_open("", ""); 9: iconv(cd, NULL, NULL, NULL, NULL); 10: return EXIT_SUCCESS; 11: } /* end */ "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin17 -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L. -L /BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib -L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib -arch x86_64 -arch i386 -lruby.2.3.0 -liconv -lpthread -ldl -lobjc " ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib' ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/lib' checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: #include 5: 6: int main(void) 7: { 8: iconv_t cd = iconv_open("", ""); 9: iconv(cd, NULL, NULL, NULL, NULL); 10: return EXIT_SUCCESS; 11: } /* end */ -------------------- I also get pretty much the same error whenever I try to install a gem, so it's probably an error with my system or with gem. I have looked online for reasons and others have had the same problem but theirs was solved with methods that didn't solve mine. If anyone can help get rid of this error and successfully install rails I would really appreciate it.
P.S: I am running OSX 10.13.3 High Serria and I have disabled rootlessness (System Integrity Protection)
Thank You!
Beckett O'Brien (31 rep)
May 26, 2018, 10:35 PM
0 votes
1 answers
331 views
openSUSE Leap 42.3: Cannot install Jekyll due to dependency issues
I'm trying to install Jekyll on my Linode server running openSUSE Leap 42.3, but Zypper gives me this error: # zypper install ruby2.1-rubygem-jekyll Loading repository data... Reading installed packages... Resolving package dependencies... Problem: nothing provides rubygem(ruby:2.1.0:colorator:0) >=...
I'm trying to install Jekyll on my Linode server running openSUSE Leap 42.3, but Zypper gives me this error: # zypper install ruby2.1-rubygem-jekyll Loading repository data... Reading installed packages... Resolving package dependencies... Problem: nothing provides rubygem(ruby:2.1.0:colorator:0) >= 0.1 needed by ruby2.1-rubygem-jekyll-3.1.6-3.3.x86_64 Solution 1: do not install ruby2.1-rubygem-jekyll-3.1.6-3.3.x86_64 Solution 2: break ruby2.1-rubygem-jekyll-3.1.6-3.3.x86_64 by ignoring some of its dependencies Choose from above solutions by number or cancel [1/2/c] (c): If I force-install by selecting solution 2, Jekyll fails because it cannot find the correct version of the colorator gem. This occurs even if I install the ruby2.1-rubygem-colorator package. Is this an issue with the Jekyll package, or is the problem upstream? I don't want to use the gem command directly because this could result in conflicts with files installed by the package manager. I'd rather use one and only one way to install applications at the system level.
bwDraco (3393 rep)
Sep 7, 2017, 02:18 AM • Last activity: Oct 17, 2017, 04:17 PM
0 votes
1 answers
944 views
How do I get sudo to read my ~/.gemrc file?
I'm using Debian Linux, Ruby on Rails 5 on Apache with Passenger. I crated the file ~/.gemrc gem: --no-rdoc --no-ri However, I'm running the command sudo bundle install and it doesn't seem to be picking up the above. How do I get "sudo" to recognize my "~/.gemrc" file? ps - I have to run with sudo b...
I'm using Debian Linux, Ruby on Rails 5 on Apache with Passenger. I crated the file ~/.gemrc gem: --no-rdoc --no-ri However, I'm running the command sudo bundle install and it doesn't seem to be picking up the above. How do I get "sudo" to recognize my "~/.gemrc" file? ps - I have to run with sudo b/c the Apache directory from where I'm running this command complains about bad permissions if I don't do this.
Dave (2808 rep)
Sep 14, 2017, 03:30 PM • Last activity: Sep 14, 2017, 04:22 PM
1 votes
1 answers
52 views
How to start gem ffaker in Debian?
I install [ffaker][1] but cannot find it in my PATH masi@masi:~$ sudo gem install ffaker Fetching: ffaker-2.6.0.gem (100%) Successfully installed ffaker-2.6.0 Parsing documentation for ffaker-2.6.0 Installing ri documentation for ffaker-2.6.0 Done installing documentation for ffaker after 4 seconds...
I install ffaker but cannot find it in my PATH masi@masi:~$ sudo gem install ffaker Fetching: ffaker-2.6.0.gem (100%) Successfully installed ffaker-2.6.0 Parsing documentation for ffaker-2.6.0 Installing ri documentation for ffaker-2.6.0 Done installing documentation for ffaker after 4 seconds 1 gem installed masi@masi:~$ ff ffmpeg ffplay ffprobe ffserver masi@masi:~$ require 'ffaker' bash: require: command not found masi@masi:~$ sudo ffaker sudo: ffaker: command not found OS: Debian 9
Léo Léopold Hertz 준영 (7138 rep)
Jul 29, 2017, 09:00 AM • Last activity: Jul 29, 2017, 10:23 AM
1 votes
1 answers
503 views
How can I use ruby gem commands like bundler when ruby is installed by nix package manager?
I'm new to nix package manager. After installing nix into Ubuntu 16.04 LTS(Japanese translated version), I installed ruby with `nix-env` command. Then I did `gem install bundler`. That seemed to work fine. However I couldn't use `bundle` command, while `require 'bundler'` in IRB session seemed to wo...
I'm new to nix package manager. After installing nix into Ubuntu 16.04 LTS(Japanese translated version), I installed ruby with nix-env command. Then I did gem install bundler. That seemed to work fine. However I couldn't use bundle command, while require 'bundler' in IRB session seemed to work fine. That made me confused. From my understanding, in general, it is no need to do anything for using bundle command after gem install bundler How should I understand this problem and how can I solve it? P.S English is not my native language; please excuse typing, grammar or/and word selecting errors. $ nix-env -q nix-1.11.9 ruby-2.4.1 $ gem install bundler Fetching: bundler-1.15.0.gem (100%) Successfully installed bundler-1.15.0 Parsing documentation for bundler-1.15.0 Installing ri documentation for bundler-1.15.0 Done installing documentation for bundler after 6 seconds 1 gem installed $ bundle init プログラム 'bundle' はまだインストールされていません。 次のように入力することでインストールできます: sudo apt install ruby-bundler $ irb require 'bundler' => true
cul8er (339 rep)
May 28, 2017, 09:51 AM • Last activity: Jun 8, 2017, 01:23 PM
2 votes
0 answers
607 views
x64_mingw not a valid platform - Rails 5
Bluehost Shared Server ruby -v 2.2.2 rails -v 5.0.0.1 gem -v 2.4.5 **~/.bashrc** export HPATH=$HOME export GEM_HOME=$HPATH/ruby/gems export GEM_PATH=$GEM_HOME:/lib64/ruby/gems/1.9.3 export GEM_CACHE=$GEM_HOME/cache export PATH=$HPATH/ruby/bin:$PATH export PATH=$HPATH/ruby/gems/bin:$PATH export PATH=...
Bluehost Shared Server
ruby -v 2.2.2
rails -v 5.0.0.1
gem -v 2.4.5 **~/.bashrc** export HPATH=$HOME export GEM_HOME=$HPATH/ruby/gems export GEM_PATH=$GEM_HOME:/lib64/ruby/gems/1.9.3 export GEM_CACHE=$GEM_HOME/cache export PATH=$HPATH/ruby/bin:$PATH export PATH=$HPATH/ruby/gems/bin:$PATH export PATH=$HPATH/ruby/gems:$PATH Clean Install, but when creating new app it throws an "**invalid platform**" error. create vendor/assets/javascripts/.keep create vendor/assets/stylesheets create vendor/assets/stylesheets/.keep remove config/initializers/cors.rb run bundle install x64_mingw is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :mri, :mri_18, :mri_19, :mri_20, :rbx, :jruby, :mswin, :mingw, :mingw_18, :mingw_19, :mingw_20] run bundle exec spring binstub --all x64_mingw is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :mri, :mri_18, :mri_19, :mri_20, :rbx, :jruby, :mswin, :mingw, :mingw_18, :mingw_19, :mingw_20] **Gemfile** # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.0', '>= 5.0.0.1' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use Puma as the app server gem 'puma', '~> 3.0' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 3.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platform: :mri end group :development do # Access an IRB console on exception pages or by using anywhere in the code. gem 'web-console' gem 'listen', '~> 3.0.5' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] Would that mean **only** comment out gem "tzinfo-data", or are other changes required as well?
CJ Dana (231 rep)
Aug 30, 2016, 10:42 AM • Last activity: Aug 30, 2016, 09:12 PM
4 votes
0 answers
1272 views
How to install a Ruby gem on Arch Linux using Puppet?
I've got [the following][1]: class travis_linter { include shell package { 'travis-lint': ensure => latest, provider => gem, } } When I try to [test it][2], however, I get the following Puppet output: ==> default: Debug: Executing: '/usr/bin/gem install --no-rdoc --no-ri travis-lint' ==> default: Er...
I've got the following : class travis_linter { include shell package { 'travis-lint': ensure => latest, provider => gem, } } When I try to test it , however, I get the following Puppet output: ==> default: Debug: Executing: '/usr/bin/gem install --no-rdoc --no-ri travis-lint' ==> default: Error: Could not update: Execution of '/usr/bin/gem install --no-rdoc --no-ri travis-lint' returned 1: ERROR: While executing gem ... (TypeError) ==> default: wrong argument type nil (expected Regexp) ==> default: Error: /Stage[main]/Travis_linter/Package[travis-lint]/ensure: change from absent to latest failed: Could not update: Execution of '/usr/bin/gem install --no-rdoc --no-ri travis-lint' returned 1: ERROR: While executing gem ... (TypeError) ==> default: wrong argument type nil (expected Regexp) Other possibly relevant output from the full log file : Debug: Puppet::Type::Package::ProviderPuppet_gem: file /opt/puppetlabs/puppet/bin/gem does not exist Debug: /Package[puppet-lint]: Provider gem does not support features virtual_packages; not managing attribute allow_virtual Debug: /Package[reek]: Provider gem does not support features virtual_packages; not managing attribute allow_virtual Debug: /Package[travis-lint]: Provider gem does not support features virtual_packages; not managing attribute allow_virtual Using exec (with --backtrace and --debug) instead of package results in the same error: ==> default: Debug: Executing: '/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: NOTE: Debugging mode prints all exceptions even when rescued ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception ArgumentError' at /usr/lib/ruby/2.3.0/rubygems.rb:498 - couldn't find HOME environment -- expanding ~' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception `LoadError' at /usr/lib/ruby/2.3.0/resolv.rb:171 - LoadError ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception `Resolv::DNS::Config::NXDomain' at /usr/lib/ruby/2.3.0/resolv.rb:549 - _rubygems._tcp.api.rubygems.org ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception `Resolv::DNS::Config::NXDomain' at /usr/lib/ruby/2.3.0/resolv.rb:549 - _rubygems._tcp.api.rubygems.org.vagrant.vm ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception `Resolv::ResolvError' at /usr/lib/ruby/2.3.0/resolv.rb:494 - DNS result has no information for _rubygems._tcp.api.rubygems.org ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: Exception `TypeError' at /usr/lib/ruby/2.3.0/rubygems/installer.rb:674 - wrong argument type nil (expected Regexp) ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: ERROR: While executing gem ... (TypeError) ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: wrong argument type nil (expected Regexp) ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/installer.rb:674:in `sub' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/installer.rb:674:in `check_that_user_bin_dir_is_in_path' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/installer.rb:180:in `initialize' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/installer.rb:104:in `new' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/installer.rb:104:in `at' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/request_set.rb:163:in `block in install' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:in `each' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/request_set.rb:151:in `install' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/commands/install_command.rb:250:in `install_gem' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/commands/install_command.rb:300:in `block in install_gems' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/commands/install_command.rb:296:in `each' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/commands/install_command.rb:296:in `install_gems' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/commands/install_command.rb:203:in `execute' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/command.rb:308:in `invoke_with_build_args' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/command_manager.rb:169:in `process_args' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/command_manager.rb:139:in `run' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/lib/ruby/2.3.0/rubygems/gem_runner.rb:55:in `run' ==> default: Notice: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: /usr/bin/gem:21:in `' ==> default: Error: /usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint returned 1 instead of one of ==> default: Error: /Stage[main]/Travis_linter/Exec[/usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint]/returns: change from notrun to 0 failed: /usr/bin/gem install --no-rdoc --no-ri --backtrace --debug travis-lint returned 1 instead of one of I am able to run the exact same command manually: [vagrant@archlinux ~]$ /usr/bin/gem install --no-rdoc --no-ri travis-lint Fetching: travis-lint-2.0.0.gem (100%) WARNING: You don't have /home/vagrant/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run. Successfully installed travis-lint-2.0.0 1 gem installed Ditto in a root shell : [vagrant@archlinux ~]$ sudo -s root@archlinux:/home/vagrant# /usr/bin/gem install --no-rdoc --no-ri travis-lint WARNING: You don't have /root/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run. Successfully installed travis-lint-2.0.0 1 gem installed And ditto in sh: [vagrant@archlinux ~]$ sudo sh sh-4.3# /usr/bin/gem install --no-rdoc --no-ri travis-lint WARNING: You don't have /root/.gem/ruby/2.3.0/bin in your PATH, gem executables will not run. Successfully installed travis-lint-2.0.0 1 gem installed Is something broken about running gem 2.5.1 with Puppet 4.3.1/4.3.2 ? --- Finally some findings ! It seems **gem install in an environment without the HOME variable defined will fail :** unless !Gem.win_platform? && (path.include? user_bin_dir.sub(ENV['HOME'], '~')) The ugly workaround: exec { '/usr/bin/gem install --no-rdoc --no-ri travis-lint': environment => 'HOME=/root'; }
l0b0 (53368 rep)
Jan 3, 2016, 12:04 AM • Last activity: Feb 17, 2016, 09:39 PM
9 votes
2 answers
11410 views
How to specify a higher ruby version for installing a gem?
I install a ruby package. $ sudo gem install pdfbeads ERROR: Error installing pdfbeads: nokogiri requires Ruby version >= 1.9.2. says that it needs ruby version greater than 1.9.1. My ruby is 1.8.7. $ which ruby /usr/bin/ruby $ ruby --version ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] $ gem...
I install a ruby package. $ sudo gem install pdfbeads ERROR: Error installing pdfbeads: nokogiri requires Ruby version >= 1.9.2. says that it needs ruby version greater than 1.9.1. My ruby is 1.8.7. $ which ruby /usr/bin/ruby $ ruby --version ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] $ gem --version 1.8.15 I have ruby 1.9.1 and 1.9.3. $ whereis ruby1.9.1 ruby1.9: /usr/bin/ruby1.9.1 /usr/bin/ruby1.9.3 /usr/bin/X11/ruby1.9.1 /usr/bin/X11/ruby1.9.3 but 1.9.3 is linked to 1.9.1. $ ls /usr/bin/ruby* -l lrwxrwxrwx 1 root root 22 Jul 10 02:33 /usr/bin/ruby -> /etc/alternatives/ruby -rwxr-xr-x 1 root root 5504 Nov 26 2013 /usr/bin/ruby1.8 -rwxr-xr-x 1 root root 5552 Nov 26 2013 /usr/bin/ruby1.9.1 lrwxrwxrwx 1 root root 9 Nov 26 2013 /usr/bin/ruby1.9.3 -> ruby1.9.1 It says itself is 1.9.3 however: $ /usr/bin/ruby1.9.3 --version ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] I change the link to ruby1.9.3 anyway $ ls -l /usr/bin/ruby* lrwxrwxrwx 1 root root 9 Aug 20 21:16 /usr/bin/ruby -> ruby1.9.3 -rwxr-xr-x 1 root root 5504 Nov 26 2013 /usr/bin/ruby1.8 -rwxr-xr-x 1 root root 5552 Nov 26 2013 /usr/bin/ruby1.9.1 lrwxrwxrwx 1 root root 9 Nov 26 2013 /usr/bin/ruby1.9.3 -> ruby1.9.1 The installation still says it needs ruby >= 1.9.2 $ sudo gem install pdfbeads ERROR: Error installing pdfbeads: nokogiri requires Ruby version >= 1.9.2. $ gem --version 1.8.15 $ ruby --version ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] Do I have ruby1.9.3 or just ruby1.9.1? How can I make sudo gem install pdfbeads use ruby 1.9.3? ***************************** **Update:** I have now followed the way of installing ruby 2.1.0 by RVM, I have added the path of rvm to my PATH. I then successfully installed ruby2.1.0 by $ rvm install 2.1.0 and made it default $ rvm use 2.1.0 $ ruby -v ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux] $ which ruby /home/tim/.rvm/rubies/ruby-2.1.0/bin/ruby Now back to install the package pdfbeads, but without sudo (because I thought I had installed ruby 2.1.0 under my account, not under root, and installation of the package requires the newer version ruby) $ gem install pdfbeads ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /var/lib/gems/1.8 directory. So I think I have to use sudo. But I still get the original error, $ sudo gem install pdfbeads ERROR: Error installing pdfbeads: nokogiri requires Ruby version >= 1.9.2. I think it is because under sudo, the user is root, which still has the older version ruby1.8.7 as the default. So I wonder what can I do now?
Tim (106420 rep)
Aug 21, 2014, 12:43 AM • Last activity: May 14, 2015, 07:38 PM
0 votes
2 answers
664 views
Installing Jekyll on Elementary OS using gem
When I try to install Jekyll on Elementary OS Luna with the command `sudo gem install jekyll --no-rdoc --no-ri` I get the following error. -- rbconfig (LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:29 from /usr/bin/gem:8:in `require' from /usr/bin/gem:8 Can anybody help me make sense of...
When I try to install Jekyll on Elementary OS Luna with the command sudo gem install jekyll --no-rdoc --no-ri I get the following error. -- rbconfig (LoadError) from /usr/lib/ruby/vendor_ruby/1.8/rubygems.rb:29 from /usr/bin/gem:8:in `require' from /usr/bin/gem:8 Can anybody help me make sense of the error and maybe suggest a fix?
Rud Faden (151 rep)
Oct 12, 2014, 08:07 AM • Last activity: Oct 15, 2014, 01:38 PM
Showing page 1 of 19 total questions