Ruby issue when installing Umpire on Ubuntu 12.04 - ruby

I am currently trying to get https://github.com/heroku/umpire working locally on my Ubuntu machine with graphite.
I have done the following steps on version 12.04 of Ubuntu:
git clone https://github.com/heroku/umpire
cd umpire
sudo apt-get install ruby-rvm
sudo rvm install ruby-1.9.2-p180
sudo apt-get install ruby-bundler
The line that is producing the error in the Gemfile:
gem 'rack-timeout', git: "https://github.com/freeformz/rack-timeout.git"
This is the error that I am getting in the terminal:
/home/vagrant/umpire/Gemfile:9:in `evaluate': compile error (SyntaxError)
/home/vagrant/umpire/Gemfile:9: syntax error, unexpected ':', expecting $end
gem 'rack-timeout', git: "https://github.com/freeformz...
^
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:17:in `build'
from /usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
I've been trying to fix this for a while but I am not particularly familiar with Ruby. Does anyone know how fix this?
Thank you in advance for any help.

I would not use the apt provided rvm. It's old and broken in a few ways AFAICT.
Start here: Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
Once I did that I was able to install the right version of ruby for my user and bundle install...
vagrant#ubuntu-12:~$ cd umpire/
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/vagrant/umpire/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
ruby-1.9.3-p547 is not installed.
To install do: 'rvm install ruby-1.9.3-p547'
vagrant#ubuntu-12:~/umpire$ rvm install ruby-1.9.3-p547
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p547.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-1.9.3-p547 - #configure
ruby-1.9.3-p547 - #download
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 11.3M 100 11.3M 0 0 1851k 0 0:00:06 0:00:06 --:--:-- 2137k
ruby-1.9.3-p547 - #validate archive
ruby-1.9.3-p547 - #extract
ruby-1.9.3-p547 - #validate binary
ruby-1.9.3-p547 - #setup
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/ruby-1.9.3-p547#global
ruby-1.9.3-p547 - #importing gemset /home/vagrant/.rvm/gemsets/global.gems....................................
ruby-1.9.3-p547 - #generating global wrappers........
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/ruby-1.9.3-p547
ruby-1.9.3-p547 - #importing gemsetfile /home/vagrant/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-1.9.3-p547 - #generating default wrappers........
vagrant#ubuntu-12:~/umpire$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching https://github.com/freeformz/rack-timeout.git
Installing rake 10.1.1
Installing addressable 2.3.5
Installing aggregate 0.2.2
Installing safe_yaml 0.9.7
Installing crack 0.4.1
Installing diff-lcs 1.2.5
Installing excon 0.31.0
Installing multipart-post 1.2.0
Installing faraday 0.8.9
Installing multi_json 1.8.4
Installing librato-metrics 1.3.0
Installing rack 1.5.2
Installing puma 2.7.1
Installing rack-protection 1.5.1
Installing rack-ssl 1.3.3
Installing rack-test 0.6.2
Using rack-timeout 0.1.0beta2 from https://github.com/freeformz/rack-timeout.git (at master)
Installing rspec-core 2.14.7
Installing rspec-expectations 2.14.4
Installing rspec-mocks 2.14.4
Installing rspec 2.14.1
Installing scrolls 0.3.3
Installing tilt 1.4.1
Installing sinatra 1.4.4
Installing webmock 1.16.1
Installing yajl-ruby 1.2.0
Using bundler 1.6.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
vagrant#ubuntu-12:~/umpire$

Related

Unable to install bundler with gem

I am using ruby 2.6.5 and I try to install bundler -v 2.2.27 gem according to documentation using this command:
gem install bundler -v 2.2.27 --default
And this is the output I get:
gem install bundler -v 2.2.27 --default
Successfully installed bundler-2.2.27 as a default gem
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory # dir_chdir - /Users/jedrek/.rvm/gems/ruby-2.6.5/specifications/gems/bundler-2.2.27
It says it installed the gem but errors out at the same time :)
When I check current version of bundler I get this output
gem info bundler
*** LOCAL GEMS ***
bundler (2.2.32, 2.2.27, 2.2.24, 2.1.4)
Authors: André Arko, Samuel Giddins, Colby Swandale, Hiroshi
Shibata, David Rodríguez, Grey Baker, Stephanie Morillo, Chris
Morris, James Wen, Tim Moore, André Medeiros, Jessica Lynn Suttles,
Terence Lee, Carl Lerche, Yehuda Katz
Homepage: https://bundler.io
License: MIT
Installed at (2.2.32): /Users/jedrek/.rvm/gems/ruby-2.6.5
(2.2.27, default): /Users/jedrek/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
(2.2.24): /Users/jedrek/.rvm/gems/ruby-2.6.5
(2.1.4): /Users/jedrek/.rvm/gems/ruby-2.6.5
As you can see it says that bundler -v 2.2.27 is installed.
When I try to install dependencies in my project I get this error:
bundle install
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 2.2.27)
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 2.2.27)' in any of the relevant sources:
the local ruby installation
Listing current bundler version locally shows this output
gem list bundler
*** LOCAL GEMS ***
bundler (2.2.32, default: 2.2.27, 2.2.24, 2.1.4)
bundler-audit (0.7.0.1, 0.6.1)
capistrano-bundler (2.0.1, 1.3.0)
I am so confused. Is this is a bug?
I am using rubygems 3.2.27
gem --version
3.2.27
UPDATE
I tried upgrading rubygems to 3.2.32 and have the same issue.

Why is my jekyll command not working anymore?

I've recently discovered that the jekyll command doesn't work anymore on my computer, after perfectly using it for several months.
Whenever I try to run a jekyll command, it says:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs':
Could not find 'jekyll' (>= 0) among 34 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/Mael/.gem/ruby/2.3.0:/Library/Ruby/Gems/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0',
execute `gem env` for more information
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/jekyll:22:in `<main>'
I'm on macOS Sierra (10.12.6).
Xcode is installed
I have Xcode installed on my computer:
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Reinstalling Jekyll
Checking ruby version and (re)installing bundler
So I tried reinstalling Jekyll as I did the first time:
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin16]
$ sudo gem install bundler
Successfully installed bundler-1.17.1
Parsing documentation for bundler-1.17.1
Done installing documentation for bundler after 4 seconds
1 gem installed
Creating a Gemfile
I created a Gemfile which contains:
gem 'github-pages'
source 'https://rubygems.org'
Bundle install (here come the issues)
And ran, in the directory that contains the Gemfile:
$ bundle install
Here, the installation doesn't work, it says:
An error occurred while installing commonmarker (0.17.13), and Bundler cannot continue.
Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
github-pages was resolved to 192, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
jekyll-commonmark was resolved to 1.2.0, which depends on
commonmarker
So I tried the gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/' command, and it says:
Building native extensions. This could take a while...
ERROR: Error installing commonmarker:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181112-6105-u9aca2.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16/ruby/config.h', needed by `arena.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-16/2.3.0/commonmarker-0.17.13/gem_make.out
I noticed that I have several jekyll and github-pages gems in my /Library/Ruby/Gems/2.0.0/gems (2.0.0) directory:
github-pages-146
github-pages-health-check-1.3.5
...
jekyll-3.4.5
jekyll-avatar-0.4.2
jekyll-coffeescript-1.0.1
[and several other jekyll directories]
...
But not in my /Library/Ruby/Gems/2.3.0/gems (2.3.0) directory! (the one which seems to be targeted by the GEM_PATH when running a jekyll command)
So, maybe I did something that changed the version or something. (I've recently installed osxfuse and sshfs (via brew), I don't know if it has anything to do with the issue?)
I don't know anything about Ruby, Gems system, and so on. Maybe the solution is obvious but I've tried several things with no success.
(Sorry it's a bit long but I wanted to be as clear as possible!)
I also don't work with Ruby, but I had a similar problem on Mac OS 10.12.6 and here is how I solved it.
This is likely caused by some disagreement between the system Ruby environment and Jekyll, and the easiest way to fix it is to create a new environment altogether.
First you should use rvm to manage your ruby versions to avoid delete the system Ruby and break your OS. After you set up rvm, run
rvm install 2.3.3
to install Ruby 2.3.3 (which is what I used). After it finished, make this the default Ruby version in your system:
rvm --default use 2.3.3
then I did the following:
gem install bundler
gem install jekyll
bundle install
and Jekyll worked for me again.
Hope that helps.
I'm not a mac user and not real familiar with ruby, but when I see ERROR: Failed to build gem native extension it usually has to do with not having the ruby version that includes the devkit.
As I understand it, you can get ruby with the devkit or ruby without the devkit, if there is no devkit it can't build some of the gems it needs. On a PC the devkit is required in order to install all of the jekyll dependencies.
I have the same problem with jeklly to bundle new website.
try this:
xcode-select --install
gem install bundler jekyll
That's the way I don't need to sudo to install bundler jekyll.
Install the Command Line Tools:
xcode-select --install
abcLabdeMacBook-Air:zeppelin-master abclab$ xcode-select --install
xcode-select: note: install requested for command line developer tools
abcLabdeMacBook-Air:zeppelin-master abclab$ gem install bundler jekyll
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
abcLabdeMacBook-Air:zeppelin-master abclab$ bundle install
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.9.25 because its extensions are not built. Try: gem pristine ffi --version 1.9.25
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Fetching gem metadata from http://rubygems.org/.................
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies.....
Using concurrent-ruby 1.1.4
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.3.0
/Library/Ruby/Gems/2.3.0/build_info
/Library/Ruby/Gems/2.3.0/cache
/Library/Ruby/Gems/2.3.0/doc
/Library/Ruby/Gems/2.3.0/extensions
/Library/Ruby/Gems/2.3.0/gems
/Library/Ruby/Gems/2.3.0/specifications
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.10
Using public_suffix 2.0.5
Using addressable 2.5.2
Using execjs 2.7.0
Using autoprefixer-rails 9.4.7
Using bundler 2.0.1
Using chunky_png 1.3.11
Using coffee-script-source 1.11.1
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.7.2
Fetching commonmarker 0.17.13
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Installing commonmarker 0.17.13 with native extensions
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching sass 3.4.25
Installing sass 3.4.25
Fetching compass-core 1.0.3
Installing compass-core 1.0.3
Fetching compass-import-once 1.0.5
Installing compass-import-once 1.0.5
Using rb-fsevent 0.10.3
Fetching ffi 1.10.0
Installing ffi 1.10.0 with native extensions
Fetching rb-inotify 0.10.0
Installing rb-inotify 0.10.0
Fetching compass 1.0.3
Installing compass 1.0.3
Fetching dnsruby 1.61.2
Installing dnsruby 1.61.2
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Using em-websocket 0.5.1
Fetching ethon 0.12.0
Installing ethon 0.12.0
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching faraday 0.15.4
Installing faraday 0.15.4
Using forwardable-extended 2.6.0
Fetching gemoji 3.0.0
Installing gemoji 3.0.0
Fetching sawyer 0.8.1
Installing sawyer 0.8.1
Fetching octokit 4.13.0
Installing octokit 4.13.0
Fetching typhoeus 1.3.1
Installing typhoeus 1.3.1
Fetching github-pages-health-check 1.8.1
Installing github-pages-health-check 1.8.1
Using jekyll-sass-converter 1.5.2
Using ruby_dep 1.5.0
Using listen 3.1.5
Fetching jekyll-watch 2.1.2
Installing jekyll-watch 2.1.2
Using kramdown 1.17.0
Using liquid 4.0.0
Using mercenary 0.3.6
Fetching pathutil 0.16.2
Installing pathutil 0.16.2
Fetching rouge 2.2.1
Installing rouge 2.2.1
Using safe_yaml 1.0.4
Fetching jekyll 3.7.4
Installing jekyll 3.7.4
Fetching jekyll-avatar 0.6.0
Installing jekyll-avatar 0.6.0
Fetching jekyll-coffeescript 1.1.1
Installing jekyll-coffeescript 1.1.1
Fetching jekyll-commonmark 1.2.0
Installing jekyll-commonmark 1.2.0
Fetching jekyll-commonmark-ghpages 0.1.5
Installing jekyll-commonmark-ghpages 0.1.5
Fetching jekyll-default-layout 0.1.4
Installing jekyll-default-layout 0.1.4
Fetching jekyll-feed 0.11.0
Installing jekyll-feed 0.11.0
Fetching jekyll-gist 1.5.0
Installing jekyll-gist 1.5.0
Fetching jekyll-github-metadata 2.9.4
Installing jekyll-github-metadata 2.9.4
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.1
Installing nokogiri 1.10.1 with native extensions
Fetching html-pipeline 2.10.0
Installing html-pipeline 2.10.0
Fetching jekyll-mentions 1.4.1
Installing jekyll-mentions 1.4.1
Fetching jekyll-optional-front-matter 0.3.0
Installing jekyll-optional-front-matter 0.3.0
Fetching jekyll-paginate 1.1.0
Installing jekyll-paginate 1.1.0
Fetching jekyll-readme-index 0.2.0
Installing jekyll-readme-index 0.2.0
Fetching jekyll-redirect-from 0.14.0
Installing jekyll-redirect-from 0.14.0
Fetching jekyll-relative-links 0.5.3
Installing jekyll-relative-links 0.5.3
Fetching rubyzip 1.2.2
Installing rubyzip 1.2.2
Fetching jekyll-remote-theme 0.3.1
Installing jekyll-remote-theme 0.3.1
Using jekyll-seo-tag 2.5.0
Fetching jekyll-sitemap 1.2.0
Installing jekyll-sitemap 1.2.0
Fetching jekyll-swiss 0.4.0
Installing jekyll-swiss 0.4.0
Fetching jekyll-theme-architect 0.1.1
Installing jekyll-theme-architect 0.1.1
Fetching jekyll-theme-cayman 0.1.1
Installing jekyll-theme-cayman 0.1.1
Fetching jekyll-theme-dinky 0.1.1
Installing jekyll-theme-dinky 0.1.1
Fetching jekyll-theme-hacker 0.1.1
Installing jekyll-theme-hacker 0.1.1
Fetching jekyll-theme-leap-day 0.1.1
Installing jekyll-theme-leap-day 0.1.1
Fetching jekyll-theme-merlot 0.1.1
Installing jekyll-theme-merlot 0.1.1
Fetching jekyll-theme-midnight 0.1.1
Installing jekyll-theme-midnight 0.1.1
Fetching jekyll-theme-minimal 0.1.1
Installing jekyll-theme-minimal 0.1.1
Fetching jekyll-theme-modernist 0.1.1
Installing jekyll-theme-modernist 0.1.1
Fetching jekyll-theme-primer 0.5.3
Installing jekyll-theme-primer 0.5.3
Fetching jekyll-theme-slate 0.1.1
Installing jekyll-theme-slate 0.1.1
Fetching jekyll-theme-tactile 0.1.1
Installing jekyll-theme-tactile 0.1.1
Fetching jekyll-theme-time-machine 0.1.1
Installing jekyll-theme-time-machine 0.1.1
Fetching jekyll-titles-from-headings 0.5.1
Installing jekyll-titles-from-headings 0.5.1
Fetching jemoji 0.10.1
Installing jemoji 0.10.1
Using minima 2.5.0
Fetching unicode-display_width 1.4.1
Installing unicode-display_width 1.4.1
Fetching terminal-table 1.8.0
Installing terminal-table 1.8.0
Fetching github-pages 193
Installing github-pages 193
Fetching sass-media_query_combiner 0.0.7
Installing sass-media_query_combiner 0.0.7
Bundle complete! 4 Gemfile dependencies, 91 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from compass:
Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Post-install message from dnsruby:
Installing dnsruby...
For issues and source code: https://github.com/alexdalitz/dnsruby
For general discussion (please tell us how you use dnsruby): https://groups.google.com/forum/#!forum/dnsruby
Post-install message from html-pipeline:
-------------------------------------------------
Thank you for installing html-pipeline!
You must bundle Filter gem dependencies.
See html-pipeline README.md for more details.
https://github.com/jch/html-pipeline#dependencies
-------------------------------------------------
It might also be that you have mistakenly installed multiple dependencies of Jekyll. In that case
$ /usr/bin/jekyll serve
might work, or remove the one or more installation of Jekyll.
Find
$ whereis jekyll
and then keep the above one and remove the rest of the installations.
I found a solution, that I think is very not clean, but works for now.
I have two directories in /Library/Ruby/Gems/:
2.0.0/
gems/
specifications/
...
2.3.0/
gems/
specifications/
...
The error output, when I try to run jekyll, tells that it checks (among others) in /Library/Ruby/Gems/2.3.0, but as I said in my question, there aren't any jekyll-related file in there.
So, I manually copied all the files from /Library/Ruby/Gems/2.0.0/gems and /Library/Ruby/Gems/2.0.0/specifications and pasted them in /Library/Ruby/Gems/2.3.0/gems and /Library/Ruby/Gems/2.3.0/specifications respectively.
I guess that the files I've copied are maybe outdated for the Ruby version I have (?), but it works perfectly.
Maybe there is a more conventional way to make it work?

Can't install ffi 1.9.0 via rvm bundle install - OSX 10.8.4

Using OSX 10.8.4 on Macbook Pro with homebrew, xcode (with command line tools) and libffi.
I have installed rvm and ruby-1.9.3-p448 and have a gemset called omega.ecoop. There is a gemfile which lists gems that are required for this project. However, I can't get them installed, after running bundle check:
Bundler can't satisfy your Gemfile's dependencies.
This is correct as they are not installed. So I use:
bundle install
which produces the following:
Sams-MacBook-Pro:ecoop Sam$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable (2.3.5)
Using chunky_png (1.2.8)
Using fssm (0.2.10)
Using sass (3.2.10)
Using compass (0.12.2)
Using breakpoint (2.0.6)
Using coderay (1.0.9)
Using compass-blend-modes (0.0.2)
Using color-schemer (0.2.5)
Using compass-normalize (1.4.3)
Using compass-rgbapng (0.2.1)
Using compass-validator (3.0.1)
Using css_parser (1.3.5)
Using eventmachine (1.0.3)
Using http_parser.rb (0.5.3)
Using em-websocket (0.5.0)
Installing ffi (1.9.0)
All going well, until:
Installing ffi (1.9.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Sam/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make
mkdir -p "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64; (if [ ! -f "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/Makefile ]; then echo "Configuring libffi for x86_64"; cd "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64 && env CC=" gcc-4.6" CFLAGS="-arch x86_64 " LDFLAGS="-arch x86_64" "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --host=x86_64-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 make -C "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64
Configuring libffi for x86_64
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: error: in `/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/libffi-x86_64':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** No targets specified and no makefile found. Stop.
make: *** ["/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a] Error 2
Gem files will remain installed in /Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0 for inspection.
Results logged to /Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.9.0), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.0'` succeeds before bundling.
This command does not work either (gem install ffi -v '1.9.0'), I get the same error. I tried:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
I have read:
can't setup ruby environment - installing fii gem error
Bundle update fails on ffi
Bundle update fails on ffi
Error installing ffi
gem install ffi -v '1.1.5' osx 10.8
Still no luck though. I followed this guide to set up RVM:
http://portertech.ca/2010/03/26/homebrew--rvm--awesome/
If this helps, ffi-1.0.11 installs without hitch, fff-1.9.0 will not install (http://rubygems.org/gems/ffi/versions).
/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.0.11 (no problem)
I wanted to use command line only (rather than jewelrybox GUI) to learn some new skills along the way but fairly stuck here. Any help would be appreciated, thanks.
EDIT
So I tried a different approach, I thought maybe it was the version of ruby that was not compatible:
rvm install 2.0.0
then create gemset this time using ruby 2.0.0
rvm use 2.0.0#omega.ecoop --create
Check it's there and selected as the current gemset (ready to install some gems)
rvm gemset list
gemsets for ruby-2.0.0-p247 (found in /Users/Sam/.rvm/gems/ruby-2.0.0-p247)
(default)
global
=> omega.ecoop
Yep all good. Try and install
bundle install
Sams-MacBook-Pro:ecoop Sam$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing addressable (2.3.5)
Installing chunky_png (1.2.8)
Installing fssm (0.2.10)
Installing sass (3.2.10)
Installing compass (0.12.2)
Installing breakpoint (2.0.6)
Installing coderay (1.0.9)
Installing compass-blend-modes (0.0.2)
Installing color-schemer (0.2.5)
Installing compass-normalize (1.4.3)
Installing compass-rgbapng (0.2.1)
Installing compass-validator (3.0.1)
Installing css_parser (1.3.5)
Installing eventmachine (1.0.3)
Installing http_parser.rb (0.5.3)
Installing em-websocket (0.5.0)
Installing ffi (1.9.0)
Installing formatador (0.2.4)
Installing rb-fsevent (0.9.3)
Installing rb-inotify (0.9.1)
Installing rb-kqueue (0.2.0)
Installing listen (1.3.0)
Installing lumberjack (1.0.4)
Installing method_source (0.8.2)
Installing slop (3.4.6)
Installing pry (0.9.12.2)
Installing thor (0.18.1)
Installing guard (1.8.2)
Installing guard-compass (0.0.8)
Installing multi_json (1.7.9)
Installing guard-livereload (1.4.0)
Installing guard-shell (0.5.1)
Installing oily_png (1.1.0)
Installing rb-fchange (0.0.6)
Installing sass-globbing (1.1.0)
Installing sassy-strings (1.0.0)
Installing singularitygs (1.1.2)
Installing susy (1.0.9)
Installing toolkit (1.3.7)
Installing yajl-ruby (1.1.0)
Using bundler (1.3.5)
Your bundle is complete!
No problems with 'Installing ffi (1.9.0)' this time. Then I removed ruby 1.9.3 as I only use it for compass/sass/susy at the moment and if 2.0.0 works, so be it.
Sams-MacBook-Pro:~ Sam$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/
ruby-1.9.3-p448 is not installed.
To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks
Sams-MacBook-Pro:ecoop Sam$ compass watch
>>> Change detected at 12:35:09 to: reset.scss
overwrite css/reset.css
overwrite css/styles.css
>>> Compass is watching for changes. Press Ctrl-C to Stop.
Works fine for my project now. Not sure of any consequences of using a newer version of ruby but lost enough time already, need to do some designing. Obviously this wont help someone who needs 1.9.3 so that original query of why ffi wouldn't install is yet to be addressed.
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/
ruby-1.9.3-p448 is not installed.
To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks
Your .ruby-version file in that directory is still 1.9.3.
My two cents- well, tuppenny.
I encountered this issue whilst trying to install an Omega 4 subtheme in Drupal when running bundle install before step 11 (which isn't mentioned in the guide... sigh.)
Omega has loads of placeholders called {{ THEME }} which are meant to be replaced by your custom theme name- and somehow (forgive me as I know nothing about Ruby!) it tried to use this weird placeholder with spaces in the gemfile.
It also tried to save the gems to the folder /home/ubuntu/.rvm/gems/ruby-1.9.3-p547#omega.{{ THEME }}/gems, which I knew looked suss.
To resolve it I did the following:
rvm use 1.9.3-p547#omega.subthemename --create
rvm gemset list
gemsets for ruby-1.9.3-p547 (found in /home/ubuntu/.rvm/gems/ruby-1.9.3-p547)
(default)
global
=> omega.mysubtheme
omega.{{ THEME }}
bundle install # This now works!
Hope this helps someone! The conclusion is that this is usually a problem with filename spaces somewhere- a lot of people have issues with OSX because it resolves the path to "Macintosh HD" which is an invalid name.
You need to make sure you have gcc46 installed.
Try brew install gcc46 and then re-run bundle install.
Usually when I have this issue it the solution is to make sure Xcode is updated.

gem check errors (registered but missing gems) after installing ruby 2.0.0-p0 with rbenv install

Everything works fine with my installation of ruby 1.9.3.
$ rbenv global 1.9.3-p385
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.1.0)
io-console (0.3)
json (1.5.4)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
$ gem check
$
However after I installed ruby 2.0.0 with rbenv install, some strange error messages showed up in gem check.
$ rbenv install 2.0.0-p0
Downloading openssl-1.0.1e.tar.gz...
-> https://www.openssl.org/source/openssl-1.0.1e.tar.gz
Installing openssl-1.0.1e...
Installed openssl-1.0.1e to /Users/gogao/.rbenv/versions/2.0.0-p0
Downloading ruby-2.0.0-p0.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
Installing ruby-2.0.0-p0...
Installed ruby-2.0.0-p0 to /Users/gogao/.rbenv/versions/2.0.0-p0
$ rbenv global 2.0.0-p0
$ rbenv rehash
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
test-unit (2.0.0.0)
$ gem check
Checking gems...
bigdecimal-1.2.0.gem has 1 problems
bigdecimal-1.2.0:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/bigdecimal-1.2.0
io-console-0.4.2.gem has 1 problems
io-console-0.4.2:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/io-console-0.4.2
json-1.7.7.gem has 1 problems
json-1.7.7:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7
minitest-4.3.2.gem has 1 problems
minitest-4.3.2:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/minitest-4.3.2
psych-2.0.0.gem has 1 problems
psych-2.0.0:
Gem registered but doesn't exist at /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/psych-2.0.0
rake-0.9.6.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rake-0.9.6.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rake-0.9.6.gemspec:
Spec file missing for installed gem
rdoc-4.0.0.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/rdoc-4.0.0.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/rdoc-4.0.0.gemspec:
Spec file missing for installed gem
test-unit-2.0.0.0.gem has 2 problems
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem:
missing gem file /Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/cache/test-unit-2.0.0.0.gem
/Users/gogao/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/specifications/test-unit-2.0.0.0.gemspec:
Spec file missing for installed gem
$
Is it a known bug? or am i doing something wrong?
For Ruby 2.0.0-p0, I also get similar warnings from gem check. However, I don't have issues at runtime with any of these gems. I suspect this might be a bug with Rubygems check command in 2.0.0.
I have similar errors. Passing options to compiler fix installation.
Before install readline and openssl with Homebrew.
RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline)
--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.0.0-p0
More info from Original Post

rails update 3.2.5

for our redmine-installation (=>tool for project planing, ticketing etc.)
we installed ruby on our server, which worked fine ...
But now we need a rails update (Rails 3.2.3) for a redmine update and
so the troubles began:
I did the following:
1.) installing ruby 1.9.3
root#information:~# rvm install 1.9.3
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #fetching
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring
ruby-1.9.3-p194 - #compiling
ruby-1.9.3-p194 - #installing
Removing old Rubygems files...
Installing rubygems-1.8.24 for ruby-1.9.3-p194 ...
Installation of rubygems completed successfully.
ruby-1.9.3-p194 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p194 - #importing default gemsets (/usr/local/rvm/gemsets/)
Install of ruby-1.9.3-p194 - #complete
root#information:~# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
root#information:~#
root#information:/var/www/redmine# rvm docs generate
Currently 'rvm docs ...' does not work with non-rvm rubies.
root#information:/var/www/redmine#
2.) updating gem
root#information:/var/www/redmine# gem update
Updating installed gems
Updating actionmailer
Successfully installed i18n-0.6.0
Successfully installed multi_json-1.3.6
Successfully installed activesupport-3.2.5
Successfully installed builder-3.0.0
Successfully installed activemodel-3.2.5
Successfully installed rack-1.4.1
Successfully installed rack-cache-1.2
Successfully installed rack-test-0.6.1
Successfully installed journey-1.0.3
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.1.3
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.5
Successfully installed mime-types-1.18
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.4.4
Successfully installed actionmailer-3.2.5
Updating activerecord
Successfully installed arel-3.0.2
Successfully installed activerecord-3.2.5
Updating activeresource
Successfully installed activeresource-3.2.5
Updating bundler
Successfully installed bundler-1.1.4
Updating fastercsv
Successfully installed fastercsv-1.5.5
Updating rails
Building native extensions. This could take a while...
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rack-ssl-1.3.2
Successfully installed thor-0.15.2
Successfully installed json-1.7.3
Successfully installed rdoc-3.12
Successfully installed railties-3.2.5
Successfully installed rails-3.2.5
Gems updated: i18n, multi_json, activesupport, builder, activemodel, rack, rack-cache, rack-test, journey, hike, tilt, sprockets, erubis, actionpack, mime-types, polyglot, treetop, mail, actionmailer, arel, activerecord, activeresource, bundler, fastercsv, rack-ssl, thor, json, rdoc, railties, rails
root#information:/var/www/redmine#
3.) trying to update rails
root#information:/var/www/redmine# gem install rails --version '~> 3.2.0'
Successfully installed rails-3.2.5
1 gem installed
Installing ri documentation for rails-3.2.5...
Installing RDoc documentation for rails-3.2.5...
root#information:/var/www/redmine# rails -v
Rails 2.3.5
root#information:/var/www/redmine#
My problem is, that redmine 2.0.1 had problems with ruby 1.9.3
and so tried to downgrade ruby by e.g. "rvm uninstall 1.9.3" and tried
to reinstall ruby 1.8.6...
After all I just upgraded to ruby 1.9.3 but failed to upgrade to rails 3.2.5....
Can you help me here ?
I'm new to ruby. Did I forget installation steps?.
Thanks in advance for your help?
Cheers,
Ansgar
Ruby upgrades will not, in general, disturb your database. So, first step is to backup your database. Rails upgrades will often disturb your database once you have a clean install, since often you will have to do a "rake db:migrate" at the end.
There are a number of steps to upgrading the complete stack:ruby, rails, then redmine. You will need to read this document, which will guide you step by step through the upgrade:
http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

Resources