Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rails from package management cannot create new project (F21 and F22 Beta)

My webhoster supports Python, but only as scripts, now with Django. Since I am tired of PHP, I would like to try something new. The hoster offers Rails, so I thought about giving Ruby and Rails a shot. From the long term Debian Ruby packager I read that the Ruby community prefers using gem over the package management system of the distributions.

I still tried to install rubygem-rails and then performed rails new blog as given in the tutorial. This did not work on either version of Fedora that I have in virtual machines. On Fedora 21 (hostname martin-konik) the end of the error is this:

         run  bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.7.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb 
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /home/mu/.gem/ruby/gems/json-1.8.2 for inspection.
Results logged to /home/mu/.gem/ruby/extensions/x86_64-linux/json-1.8.2/gem_make.out
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
         run  bundle exec spring binstub --all
/usr/share/gems/gems/bundler-1.7.6/lib/bundler/friendly_errors.rb:10:in `rescue in with_friendly_errors': uninitialized constant Thor::AmbiguousTaskError (NameError)
        from /usr/share/gems/gems/bundler-1.7.6/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
        from /usr/share/gems/gems/bundler-1.7.6/bin/bundle:18:in `<main>'
bundler: command not found: spring
Install missing gem executables with `bundle install`

Then on Fedora 22 Beta, I had some load errors, whatever that might be:

LoadError: no such file to load -- thread_safe/jruby_cache_backend
     ThreadSafe at /usr/share/gems/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:12
         (root) at /usr/share/gems/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:3
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:1
    Inflections at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:28
      Inflector at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:27
  ActiveSupport at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:6
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:5
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflections.rb:1
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:3
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/dependencies/autoload.rb:1
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support.rb:25
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/railties-4.2.0/lib/rails/generators.rb:6
           load at org/jruby/RubyKernel.java:1087
         (root) at /usr/bin/rails:23

Full output of both Fedora 21 and Fedora 22 Beta.

Is this a bug in the packaging of the gems in Fedora or is it a fault on my side?

rails from package management cannot create new project (F21 and F22 Beta)

My webhoster supports Python, but only as scripts, now with Django. Since I am tired of PHP, I would like to try something new. The hoster offers Rails, so I thought about giving Ruby and Rails a shot. From the long term Debian Ruby packager I read that the Ruby community prefers using gem over the package management system of the distributions.

I still tried to install rubygem-rails and then performed rails new blog as given in the tutorial. This did not work on either version of Fedora that I have in virtual machines. On Fedora 21 (hostname martin-konik) the end of the error is this:

         run  bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.4.2
Installing i18n 0.7.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb 
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /home/mu/.gem/ruby/gems/json-1.8.2 for inspection.
Results logged to /home/mu/.gem/ruby/extensions/x86_64-linux/json-1.8.2/gem_make.out
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
         run  bundle exec spring binstub --all
/usr/share/gems/gems/bundler-1.7.6/lib/bundler/friendly_errors.rb:10:in `rescue in with_friendly_errors': uninitialized constant Thor::AmbiguousTaskError (NameError)
        from /usr/share/gems/gems/bundler-1.7.6/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
        from /usr/share/gems/gems/bundler-1.7.6/bin/bundle:18:in `<main>'
bundler: command not found: spring
Install missing gem executables with `bundle install`

Then on Fedora 22 Beta, I had some load errors, whatever that might be:

LoadError: no such file to load -- thread_safe/jruby_cache_backend
     ThreadSafe at /usr/share/gems/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:12
         (root) at /usr/share/gems/gems/thread_safe-0.3.4/lib/thread_safe/cache.rb:3
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:1
    Inflections at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:28
      Inflector at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:27
  ActiveSupport at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:6
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/inflections.rb:5
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflections.rb:1
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/inflector/methods.rb:3
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support/dependencies/autoload.rb:1
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
        require at org/jruby/RubyKernel.java:1071
         (root) at /usr/share/gems/gems/activesupport-4.2.0/lib/active_support.rb:25
         (root) at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:1
        require at org/jruby/RubyKernel.java:1071
        require at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54
         (root) at /usr/share/gems/gems/railties-4.2.0/lib/rails/generators.rb:6
           load at org/jruby/RubyKernel.java:1087
         (root) at /usr/bin/rails:23

Full output of both Fedora 21 and Fedora 22 Beta.

Is this a bug in the packaging of the gems in Fedora or is it a fault on my side?