This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 829209 - Ruby & Rails have blocking problems at runtime (method undefined)
Ruby & Rails have blocking problems at runtime (method undefined)
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
17
i686 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Bohuslav "Slavek" Kabrda
Fedora Extras Quality Assurance
:
: 834043 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-06 04:41 EDT by Charlie
Modified: 2012-06-22 01:40 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 08:46:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Charlie 2012-06-06 04:41:40 EDT
Description of problem:
Ruby and rails have strange behavior on fedora 17

Version-Release number of selected component (if applicable):


How reproducible: each time

Steps to Reproduce:
Install F17
Install ruby
Try to install redmine/run a rake program as described in the tutorial:http://www.redmine.org/projects/redmine/wiki/RedmineInstall
  
Actual results:
http://www.redmine.org/issues/11094
http://www.redmine.org/issues/11071
http://forums.fedoraforum.org/showthread.php?t=279545,


 (function active_record not defined)

Expected results:
Redmine installed
Comment 1 Bohuslav "Slavek" Kabrda 2012-06-06 04:54:38 EDT
Hi Charlie,
I'm not sure that this a problem to report to us. Obviusly, your problem is in the Redmine or Rails 3.2.3. Neither of them are in our official repositories and you probably installed them via bundler or "gem install", so it'd be best to report this to Redmine (as I see you already did) and possibly to Rails or other gems that might have caused this issue.
Comment 2 Bohuslav "Slavek" Kabrda 2012-06-06 05:01:22 EDT
On second thought, similar issue occured due to the way we unbundled bigdecimal gem from Ruby. Maybe you could try adding bigdecimal to the Gemfile, delete Gemfile.lock and run bundle install again?
Comment 3 Bohuslav "Slavek" Kabrda 2012-06-06 05:41:52 EDT
(In reply to comment #2)
> On second thought, similar issue occured due to the way we unbundled
> bigdecimal gem from Ruby. Maybe you could try adding bigdecimal to the
> Gemfile, delete Gemfile.lock and run bundle install again?

Yes, the Gem to blame here is arel, because it doesn't have the bigdecimal dependency - reported here [1] (also, there is one more report for activesupport [2], which basically sums up the problems with fake gems and includes some more references, if you are interested).

[1] https://github.com/rails/arel/issues/107
[2] https://github.com/rails/rails/issues/5355
Comment 4 Charlie 2012-06-06 12:44:46 EDT
I've installed bigdecimal 1.1.0 gem, but the problem is still there, another track? I continue to investigate and test what you'll give me.
Comment 5 Charlie 2012-06-06 12:45:55 EDT
Notice that I've also tried to uninstall all gems, reinstalling bigdecimal first and reinstalling all..
Comment 6 Etienne Massip 2012-06-06 13:17:47 EDT
This post here: http://forums.fedoraforum.org/showthread.php?t=279545 makes me think that the issue could maybe be easily reproducible straight with a bare 'rails generate'd application (http://guides.rubyonrails.org/command_line.html#rails-generate) and so a Fedora-upgrade bug more probably than an application-sided one.
Comment 7 Vít Ondruch 2012-06-07 05:05:50 EDT
(In reply to comment #4)
> I've installed bigdecimal 1.1.0 gem, but the problem is still there, another
> track? I continue to investigate and test what you'll give me.

After installing the gem, have you followed the instructions "Maybe you could try adding bigdecimal to the Gemfile, delete Gemfile.lock and run bundle install again?" provided by Slavek?
Comment 8 Charlie 2012-06-07 14:38:37 EDT
I did, I must have learned about git and a little about ruby, with no success.

For info, I modified gemspecs of activerecord,redmine & ariel, Gemfiles of rails & ariel, then bundle installed all.
Always the same error...

Any other clue?
Comment 9 Sven Lankes 2012-06-07 14:52:44 EDT
(In reply to comment #2)

> On second thought, similar issue occured due to the way we unbundled
> bigdecimal gem from Ruby. Maybe you could try adding bigdecimal to the
> Gemfile, delete Gemfile.lock and run bundle install again?

I had the same issue and this fixed it for me.

minitest also needs to be added in the same way to use any rails app that uses migrations.

So: edit $RAILSDIR/Gemfile and add 

gem "bigdecimal" , "~> 1.1.0" 
gem "minitest"

then rm $RAILDIR/Gemfile.lock

and then "bundle install"
Comment 10 Bohuslav "Slavek" Kabrda 2012-06-08 01:39:18 EDT
Guys,
the Fedora Ruby SIG is currently discussing this [1] because we obviously don't want anyone to run from us :)
It seems that the solution will be placing symlinks to bigdecimal files to ruby stdlib dir, which will solve all these issues and there will be no need for modifications.
I will keep you posted about the discussion and it's outcome, when we reach a decision. Any comments and suggestions from you are welcome, we are open to proposals.

[1] http://lists.fedoraproject.org/pipermail/ruby-sig/2012-June/001019.html
Comment 11 Etienne Massip 2012-06-08 09:50:36 EDT
FYI, it does not seem to be enough to fix the issue hit at http://www.redmine.org/issues/11071#change-38819.
Comment 12 Bohuslav "Slavek" Kabrda 2012-06-08 09:59:25 EDT
(In reply to comment #11)
> FYI, it does not seem to be enough to fix the issue hit at
> http://www.redmine.org/issues/11071#change-38819.

What are you refering to exactly? The solution proposed at Comment 10 or another one?
Comment 13 Etienne Massip 2012-06-08 10:16:26 EDT
(In reply to comment #12)
> What are you refering to exactly? The solution proposed at Comment 10 or
> another one?

The one proposed at Comment 2. The one proposed at Comment 10 should have the exact same effect, hence this should not be enough either?
Comment 14 Pete Stieber 2012-06-09 17:08:33 EDT
I ran into this when attempting to install redmine 2.0.1 on a Fedora 17 machine.  I tried the suggestion solution in Comment 9, but I'm still experiencing problems.  I'm new to ruby, gems... and I may have misunderstood the instructions.

I'm installing redmine under /home/projects.  I made the suggested changes to the Gemfile in that directory.  I erased Gemfile.lock and ran

# bundle install --without development test postgresql sqlite
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.3)
Using builder (3.0.0)
Using activemodel (3.2.3)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.3)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.3)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.3)
Using activeresource (3.2.3)
Using bigdecimal (1.1.0)
Using coderay (1.0.6)
Using json (1.7.3)
Using minitest (3.0.1)
Using mysql2 (0.3.11)
Using net-ldap (0.3.1)
Using bundler (1.1.4)
Using rack-ssl (1.3.2)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.3)
Using rails (3.2.3)
Using prototype-rails (3.2.1)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using rmagick (2.13.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

I'm still getting errors when I try to run rake to generate a secret token.

# rake generate_secret_token --trace
rake aborted!
undefined method `active_record' for #<Rails::Application::Configuration:0x00000003a154c0>
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/railtie/configuration.rb:85:in `method_missing'
/home/projects/config/application.rb:26:in `<class:Application>'
/home/projects/config/application.rb:13:in `<module:RedmineApp>'
/home/projects/config/application.rb:12:in `<top (required)>'
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/home/projects/Rakefile:5:in `<top (required)>'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/share/gems/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'

I'm new to debugging ruby.  Where can I learn about this?

Is there a proposed solution to this I could try?
Comment 15 Bohuslav "Slavek" Kabrda 2012-06-11 01:50:41 EDT
Guys, I think I will try to to push the solution proposed in Comment 10 today, so I will let you know and you may try if that solves the problem, ok?
Comment 16 Fedora Update System 2012-06-11 05:48:55 EDT
ruby-1.9.3.194-13.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ruby-1.9.3.194-13.fc17
Comment 17 Bohuslav "Slavek" Kabrda 2012-06-12 02:20:17 EDT
You can try updating with
"sudo yum update ruby rubygem-bigdecimal --enablerepo=updates-testing"
The good news is, that creating new rails app now works.

The bad news is that Redmine still doesn't. For the update, I have only dealt with bigdecimal and io-console gems, thinking that the other Ruby-bundled gems would be in the Gemfile and therefore would get loaded. I should have looked there. But really, this is a very dirty thing to do, Redmine relies on something that is bundled in the Ruby itself, not knowing what its version is. This makes me wonder what they have Gemfile for.

Reported here: http://www.redmine.org/issues/11141
Comment 18 Pete Stieber 2012-06-12 17:25:19 EDT
(In reply to comment #17)
BK> You can try updating with
BK> "sudo yum update ruby rubygem-bigdecimal --enablerepo=updates-testing"
BK> The good news is, that creating new rails app now works.
BK> 
BK> The bad news is that Redmine still doesn't.

I combined your ruby and rubygem-bigdecimal install from the testing area with the following suggestion from comment #9...

SL> So: edit $RAILSDIR/Gemfile and add 
SL> 
SL> gem "bigdecimal" , "~> 1.1.0" 
SL> gem "minitest"
SL> 
SL> then rm $RAILDIR/Gemfile.lock
SL> 
SL> and then "bundle install"

where the Gemfile I edited was the one from redmine, and the bundle command was...

bundle install --without development test postgresql sqlite

...and I am able to proceed with my redmine installation.  In other words, the following command...

rake generate_secret_token --trace

worked.  Thanks you!
Comment 19 Bohuslav "Slavek" Kabrda 2012-06-13 01:47:24 EDT
(In reply to comment #18)
> (In reply to comment #17)
> BK> You can try updating with
> BK> "sudo yum update ruby rubygem-bigdecimal --enablerepo=updates-testing"
> BK> The good news is, that creating new rails app now works.
> BK> 
> BK> The bad news is that Redmine still doesn't.
> 
> I combined your ruby and rubygem-bigdecimal install from the testing area
> with the following suggestion from comment #9...
> 
> SL> So: edit $RAILSDIR/Gemfile and add 
> SL> 
> SL> gem "bigdecimal" , "~> 1.1.0" 
> SL> gem "minitest"
> SL> 
> SL> then rm $RAILDIR/Gemfile.lock
> SL> 
> SL> and then "bundle install"
> 
> where the Gemfile I edited was the one from redmine, and the bundle command
> was...
> 
> bundle install --without development test postgresql sqlite
> 
> ...and I am able to proceed with my redmine installation.  In other words,
> the following command...
> 
> rake generate_secret_token --trace
> 
> worked.  Thanks you!

Due to the changes I made, putting bigdecimal in Gemfile is no longer needed. So the only modification required is adding the minitest. (My discussion with Redmine creators is going on...).

Thanks for trying it out.
Comment 20 Pete Stieber 2012-06-13 11:04:59 EDT
Bohuslav,

When I attempted the next step in the redmine install (http://www.redmine.org/projects/redmine/wiki/RedmineInstall)...

# RAILS_ENV=production rake db:migrate

I get additional errors w.r.t. the mysql2 adapter that I will append.  Is this a Fedora 17 problem or redmine?

Here is the command output with --trace...

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file -- mysql2/mysql2)
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/mysql2-0.3.11/lib/mysql2.rb:9:in `<top (required)>'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:4:in `<top (required)>'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in `resolve_hash_connection'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in `resolve_string_connection'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in `spec'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in `establish_connection'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/railtie.rb:76:in `block (2 levels) in <class:Railtie>'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/usr/local/share/gems/gems/activerecord-3.2.3/lib/active_record/base.rb:721:in `<top (required)>'
/home/projects/lib/plugins/acts_as_activity_provider/init.rb:2:in `block in <top (required)>'
/home/projects/config/initializers/00-core_plugins.rb:12:in `eval'
/home/projects/config/initializers/00-core_plugins.rb:12:in `block in <top (required)>'
/home/projects/config/initializers/00-core_plugins.rb:2:in `each'
/home/projects/config/initializers/00-core_plugins.rb:2:in `<top (required)>'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `block in load'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/share/gems/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/engine.rb:587:in `each'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/engine.rb:587:in `block in <class:Engine>'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/projects/config/environment.rb:14:in `<top (required)>'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/application.rb:103:in `require'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
/usr/local/share/gems/gems/railties-3.2.3/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/share/gems/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate => environment

I tried the suggested...

# gem install activerecord-mysql2-adapter
ERROR:  Could not find a valid gem 'activerecord-mysql2-adapter' (>= 0) in any repository
ERROR:  Possible alternatives: activerecord-jdbcmysql-adapter, activerecord-jdbch2-adapter, activerecord-odbc-adapter, activerecord-fb-adapter, activerecord-postgis-adapter

I'll move to the redmine bug reporting system if this is not a Fedora issue.  I'm just too inexperienced to know.  Thanks for the help.
Comment 21 Bohuslav "Slavek" Kabrda 2012-06-14 01:38:01 EDT
(In reply to comment #20)
> Bohuslav,
> 
> When I attempted the next step in the redmine install
> (http://www.redmine.org/projects/redmine/wiki/RedmineInstall)...
> 
> # RAILS_ENV=production rake db:migrate
> 
> I get additional errors w.r.t. the mysql2 adapter that I will append.  Is
> this a Fedora 17 problem or redmine?
> 
> Here is the command output with --trace...
> 
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> rake aborted!
> Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter`
> (cannot load such file -- mysql2/mysql2)
> 
> I tried the suggested...
> 
> # gem install activerecord-mysql2-adapter
> ERROR:  Could not find a valid gem 'activerecord-mysql2-adapter' (>= 0) in
> any repository
> ERROR:  Possible alternatives: activerecord-jdbcmysql-adapter,
> activerecord-jdbch2-adapter, activerecord-odbc-adapter,
> activerecord-fb-adapter, activerecord-postgis-adapter
> 
> I'll move to the redmine bug reporting system if this is not a Fedora issue.
> I'm just too inexperienced to know.  Thanks for the help.

I can't reproduce this.
I have the 'mysql2' gem installed and my config/database.yml contains:

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: root
  password: redhat
  encoding: utf8

Maybe you don't have the mysql2 gem?
Comment 22 Yevhen (Bodun) Kyrylchenko 2012-06-14 04:15:26 EDT
Hello!

I have same problem - "Please install the mysql2 adapter..." when I run 
RAILS_ENV=production rake db:migrate

My config/database.yml is same as Bohuslav (adapter mysql2).

Here is one more user with this truble - 
http://www.redmine.org/issues/11071#note-4

My gem list contain
mysql (2.8.1)
mysql2 (0.3.11)

bundle show mysql2 return:
/usr/local/share/gems/gems/mysql2-0.3.11

Thanks!
Comment 23 Bohuslav "Slavek" Kabrda 2012-06-14 04:53:12 EDT
I really can't reproduce this. Could you try:

1) deleting Gemfile.lock and running bundle --install again
2) 1) + uninstalling all the gems that bundler installed and bundle --install again
3) 2) + uninstalling ruby-mysql by "yum remove ruby-mysql" (if you installed it) and running bundle --install then

Is the mysql2 gem in Gemfile.lock after running bundle --install?
Comment 24 Yevhen (Bodun) Kyrylchenko 2012-06-14 06:12:31 EDT
Bingo!
Redmine started successfully!
My steps:
1) Remove ALL gems
   gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx
2) Delete file Gemfile.lock
3) Add line <gem "minitest"> to Gemfile
4) Run bundler
   bundle install --without development test postgresql sqlite rmagick
5) Then migration and other steps done without errors.

So thank you, Bohuslav for you help!
Comment 25 Bohuslav "Slavek" Kabrda 2012-06-14 06:29:40 EDT
(In reply to comment #24)
> Bingo!
> Redmine started successfully!
> My steps:
> 1) Remove ALL gems
>    gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx
> 2) Delete file Gemfile.lock
> 3) Add line <gem "minitest"> to Gemfile
> 4) Run bundler
>    bundle install --without development test postgresql sqlite rmagick
> 5) Then migration and other steps done without errors.
> 
> So thank you, Bohuslav for you help!

Great, I'm glad things work now.
Comment 26 Pete Stieber 2012-06-14 13:28:22 EDT
(In reply to comment #24)
> Bingo!
> Redmine started successfully!
> My steps:
> 1) Remove ALL gems
>    gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx
> 2) Delete file Gemfile.lock
> 3) Add line <gem "minitest"> to Gemfile
> 4) Run bundler
>    bundle install --without development test postgresql sqlite rmagick
> 5) Then migration and other steps done without errors.

I tried:

1) # gem list | cut -d" " -f1 | xargs gem uninstall -aIx

There were two messages that looked troubling...

INFO:  io-console is not installed in GEM_HOME, try:
        gem uninstall -i /usr/share/gems io-console
INFO:  rdoc is not installed in GEM_HOME, try:
        gem uninstall -i /usr/share/gems rdoc
2) # rm Gemfile.lock
3) Already had <gem "mintest">, but removed the <gem "bigdecimal" , "~> 1.1.0"> due to the Fedora fix I loaded.
4) I tried to run the bundler...
# bundle install --without development test postgresql sqlite

but ran into the following...

/usr/share/rubygems/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [activesupport-3.0.11, bigdecimal-1.1.0, i18n-0.5.0, io-console-0.3, json-1.6.5, rake-0.9.2.2, rdoc-3.12] (Gem::LoadError)
        from /usr/share/rubygems/rubygems/dependency.rb:256:in `to_spec'
        from /usr/share/rubygems/rubygems.rb:1231:in `gem'
        from /bin/bundle:18:in `<main>'
[root@bart projects]# bundle install --without development test postgresql sqlite
/usr/share/rubygems/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [activesupport-3.0.11, bigdecimal-1.1.0, i18n-0.5.0, io-console-0.3, json-1.6.5, rake-0.9.2.2, rdoc-3.12] (Gem::LoadError)
        from /usr/share/rubygems/rubygems/dependency.rb:256:in `to_spec'
        from /usr/share/rubygems/rubygems.rb:1231:in `gem'
        from /bin/bundle:18:in `<main>'

Any suggestions?
Comment 27 Pete Stieber 2012-06-14 13:33:05 EDT
(In reply to comment #26)
> (In reply to comment #24)
> I tried:
> 
> 1) # gem list | cut -d" " -f1 | xargs gem uninstall -aIx
> 
> There were two messages that looked troubling...
> 
> INFO:  io-console is not installed in GEM_HOME, try:
>         gem uninstall -i /usr/share/gems io-console
> INFO:  rdoc is not installed in GEM_HOME, try:
>         gem uninstall -i /usr/share/gems rdoc

Looks like this step removed the bundler gem, so I had to...

# gem install bundler

then continue on.  I'm still trying the successive steps.
Comment 28 Pete Stieber 2012-06-14 13:38:35 EDT
(In reply to comment #27)
> I'm still trying the successive steps.

Still having problems...

# RAILS_ENV=production rake db:migrate
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file -- mysql2/mysql2)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Do I need to do the step referenced in http://www.redmine.org/issues/11071#note-4

ln -s /usr/local/share/gems/gems/mysql2-0.3.11/lib /usr/share/ruby/mysql2

BTW, here is some installed rpm information

rubygems-1.8.24-1.fc17.noarch
rubygem-rake-0.9.2.2-11.fc17.noarch
rubygem-activesupport-3.0.11-5.fc17.noarch
rubygem-bigdecimal-1.1.0-13.fc17.x86_64
rubygem-rdoc-3.12-3.fc17.noarch
rubygem-i18n-0.5.0-3.fc17.noarch
ruby-libs-1.9.3.194-13.fc17.x86_64
ruby-irb-1.9.3.194-11.fc17.noarch
ruby-devel-1.9.3.194-13.fc17.x86_64
rubygem-json-1.6.5-1.fc17.x86_64
ruby-1.9.3.194-13.fc17.x86_64
rubygem-io-console-0.3-11.fc17.x86_64
mysql-server-5.5.23-1.fc17.x86_64
mysql-libs-5.5.23-1.fc17.x86_64
mysql-5.5.23-1.fc17.x86_64
mysql-devel-5.5.23-1.fc17.x86_64
Comment 29 Yevhen (Bodun) Kyrylchenko 2012-06-14 14:22:08 EDT
(In reply to comment #27)
> (In reply to comment #26)
> > (In reply to comment #24)
> > I tried:
> > 
> > 1) # gem list | cut -d" " -f1 | xargs gem uninstall -aIx
> > 
> > There were two messages that looked troubling...
> > 
> > INFO:  io-console is not installed in GEM_HOME, try:
> >         gem uninstall -i /usr/share/gems io-console
> > INFO:  rdoc is not installed in GEM_HOME, try:
> >         gem uninstall -i /usr/share/gems rdoc
> 
> Looks like this step removed the bundler gem, so I had to...
> 
> # gem install bundler
> 
> then continue on.  I'm still trying the successive steps.

Off course you are right, installing bundler is necessary. I forgot this step...

(In reply to comment #28)
> (In reply to comment #27)
> > I'm still trying the successive steps.
> 
> Do I need to do the step referenced in
> http://www.redmine.org/issues/11071#note-4
> 
> ln -s /usr/local/share/gems/gems/mysql2-0.3.11/lib /usr/share/ruby/mysql2

In my case this step hide error about `gem install activerecord-mysql2-adapter`, but appeared new problems. So I delete this link and only uninstalling all gems fix my problem.
Comment 30 Pete Stieber 2012-06-14 14:32:35 EDT
When I uninstall using

# gem list | cut -d" " -f1 | xargs gem uninstall -aIx

Here's what I have left:

# gem list

*** LOCAL GEMS ***

activesupport (3.0.11)
bigdecimal (1.1.0)
i18n (0.5.0)
io-console (0.3)
json (1.6.5)
rake (0.9.2.2)
rdoc (3.12)

I figure these are installed by <yum install *>

Would any of these cause a problem?

Here's the result of the bundle command...

# bundle install --without development test postgresql sqlite
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2)
Installing i18n (0.6.0)
Installing multi_json (1.3.6)
Installing activesupport (3.2.3)
Installing builder (3.0.0)
Installing activemodel (3.2.3)
Installing erubis (2.7.0)
Installing journey (1.0.3)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.3)
Installing actionpack (3.2.3)
Installing mime-types (1.18)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.4.4)
Installing actionmailer (3.2.3)
Installing arel (3.0.2)
Installing tzinfo (0.3.33)
Installing activerecord (3.2.3)
Installing activeresource (3.2.3)
Using bundler (1.1.4)
Installing coderay (1.0.6)
Installing json (1.7.3) with native extensions
...
.

.......


Installing minitest (3.1.0)
Installing mysql2 (0.3.11) with native extensions .
....................
.

Installing net-ldap (0.3.1)
Installing rack-ssl (1.3.2)
Using rdoc (3.12)
Installing thor (0.14.6)
Installing railties (3.2.3)
Installing rails (3.2.3)
Installing prototype-rails (3.2.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rmagick (2.13.1) with native extensions ..................................................................................
...........................
.

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Here's the gem list...

# gem list

*** LOCAL GEMS ***

actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3, 3.0.11)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.4)
coderay (1.0.6)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0, 0.5.0)
io-console (0.3)
journey (1.0.3)
json (1.7.3, 1.6.5)
mail (2.4.4)
mime-types (1.18)
minitest (3.1.0)
multi_json (1.3.6)
mysql2 (0.3.11)
net-ldap (0.3.1)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.13.1)
ruby-openid (2.1.8)
sprockets (2.1.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)

I'm pretty inexperienced with this so I don't know what to look for.  Thanks for the help.
Comment 31 Bohuslav "Slavek" Kabrda 2012-06-15 02:38:13 EDT
Hi Pete,
due to the new way RubyGems work in Fedora 17, the yum installed gems are (by default) untouchable by the "gem" command. So it is ok when io-console and bigdecimal are uninstallable by "gem uninstall", that is the expected behaviour.

As for your continuing problems with Redmine, I'm running out of ideas here.
- Are you sure there are no further modifications that you would do to the Gemfile? Would it be possible for you to start over by checking out the Redmine code and start from fresh unmodified code?
- What does your config/database.yml contain? Could you attach the whole file so I can test with your config?
Comment 32 Pete Stieber 2012-06-15 03:52:45 EDT
(In reply to comment #31)
> As for your continuing problems with Redmine, I'm running out of ideas here.
> - Are you sure there are no further modifications that you would do to the
> Gemfile? Would it be possible for you to start over by checking out the
> Redmine code and start from fresh unmodified code?

I'll give this a try tomorrow.

> - What does your config/database.yml contain? Could you attach the whole
> file so I can test with your config?

Here you go.  I'm using a redmine MySQL user and I removed the password.

# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: ActualPasswordHere
  encoding: utf8

development:
  adapter: mysql2
  database: redmine_development
  host: localhost
  username: root
  password:
  encoding: utf8

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  database: redmine_test
  host: localhost
  username: root
  password:
  encoding: utf8

test_pgsql:
  adapter: postgresql
  database: redmine_test
  host: localhost
  username: postgres
  password: "postgres"

test_sqlite3:
  adapter: sqlite3
  database: db/test.sqlite3

I'm still stuck on...

# RAILS_ENV=production rake db:migrate
rake aborted!
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (cannot load such file -- mysql2/mysql2)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Comment 33 Bohuslav "Slavek" Kabrda 2012-06-15 04:06:38 EDT
(In reply to comment #32)
> (In reply to comment #31)
> > As for your continuing problems with Redmine, I'm running out of ideas here.
> > - Are you sure there are no further modifications that you would do to the
> > Gemfile? Would it be possible for you to start over by checking out the
> > Redmine code and start from fresh unmodified code?
> 
> I'll give this a try tomorrow.
> 

Please do, I still can't reproduce the issue, so let's take everything from scratch. Thanks.
Comment 34 Vít Ondruch 2012-06-15 04:15:10 EDT
If I may suggest, on Fedora, please always use Fedora's Bundler, i.e.:

# gem uninstall bundler
# yum install rubygem-bundler

Also, it seems that you have installed rubygem-activesupport RPM, so you might want to remove it using yum, but that should not be of any concern anyway.
Comment 35 Pete Stieber 2012-06-15 04:29:48 EDT
(In reply to comment #34)

I'm staying up late trying a fresh install with redmine 2.0.2 (was using 2.0.1).

I started with the zip file and only added minitest to the Gemfile.  I got the same error.  Then I followed you suggestions:

> If I may suggest, on Fedora, please always use Fedora's Bundler, i.e.:
> 
> # gem uninstall bundler
> # yum install rubygem-bundler
> 
> Also, it seems that you have installed rubygem-activesupport RPM, so you
> might want to remove it using yum, but that should not be of any concern
> anyway.

I ran...

# gem list | cut -d" " -f1 | xargs gem uninstall -aIx
# yum erase rubygem-activesupport-3.0.11-5.fc17.noarch
# yum install rubygem-bundler
# gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.0.21)
diff-lcs (1.1.2)
i18n (0.5.0)
io-console (0.3)
json (1.6.5)
rake (0.9.2.2)
rdoc (3.12)
ruby2ruby (1.2.4)
ruby_parser (2.0.4)
sexp_processor (3.0.4)
thor (0.14.6)

# bundle install --without development test postgresql sqlite
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2)
Installing i18n (0.6.0)
Installing multi_json (1.3.6)
Installing activesupport (3.2.5)
Installing builder (3.0.0)
Installing activemodel (3.2.5)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.3)
Installing actionpack (3.2.5)
Installing mime-types (1.18)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.4.4)
Installing actionmailer (3.2.5)
Installing arel (3.0.2)
Installing tzinfo (0.3.33)
Installing activerecord (3.2.5)
Installing activeresource (3.2.5)
Using bundler (1.0.21)
Installing coderay (1.0.6)
Installing json (1.7.3) with native extensions
...
.

.......


Installing minitest (3.1.0)
Installing mysql2 (0.3.11) with native extensions .
....................
.

Installing net-ldap (0.3.1)
Installing rack-ssl (1.3.2)
Using rdoc (3.12)
Installing thor (0.15.2)
Installing railties (3.2.5)
Installing rails (3.2.5)
Installing prototype-rails (3.2.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rmagick (2.13.1) with native extensions ..................................................................................
...........................
.

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
# rake generate_secret_token
# RAILS_ENV=production rake db:migrate

And this step worked!  Thanks for your patience.  I'll continue on with successive steps and see how it goes.
Comment 36 Pete Stieber 2012-06-15 04:38:57 EDT
Up and running with WEBrick and no SELinux problems... yet ;-)  Thanks again.
Comment 37 Charlie 2012-06-17 15:47:24 EDT
Can you explain the way you succeed?

I did (with no ruby deps neither yum rubygem or gem):
* yum install ruby ruby-devel
* yum install rubygem-bundler
* yum install rubygem-bigdecimal
then in the redmine 2.0.2 folder:
bundle install

then try to run with a good conf (my working 2.0.0)

ruby /var/www/redmine/2.0.2/script/rails server webrick -e production &

but I always have the `method_missing' error

Regards
Comment 38 Vladimir 2012-06-17 19:09:48 EDT
# gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.0.21)
diff-lcs (1.1.2)
hashery (1.4.0)
i18n (0.5.0)
io-console (0.3)
json (1.6.5)
mkrf (0.2.3)
rake (0.9.2.2)
rdoc (3.12)
ruby2ruby (1.2.4)
ruby_parser (2.0.4)
sexp_processor (3.0.4)
thor (0.14.6)
---------------------------------------
# bundle install --without development test postgresql sqlite
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2) 
Installing i18n (0.6.0) 
Installing multi_json (1.3.6) 
Installing activesupport (3.2.5) 
Installing builder (3.0.0) 
Installing activemodel (3.2.5) 
Installing erubis (2.7.0) 
Installing journey (1.0.4) 
Installing rack (1.4.1) 
Installing rack-cache (1.2) 
Installing rack-test (0.6.1) 
Installing hike (1.2.1) 
Installing tilt (1.3.3) 
Installing sprockets (2.1.3) 
Installing actionpack (3.2.5) 
Installing mime-types (1.18) 
Installing polyglot (0.3.3) 
Installing treetop (1.4.10) 
Installing mail (2.4.4) 
Installing actionmailer (3.2.5) 
Installing arel (3.0.2) 
Installing tzinfo (0.3.33) 
Installing activerecord (3.2.5) 
Installing activeresource (3.2.5) 
Using bundler (1.0.21) 
Installing coderay (1.0.6) 
Installing json (1.7.3) with native extensions 
Installing mysql2 (0.3.11) with native extensions 
Installing net-ldap (0.3.1) 
Installing rack-ssl (1.3.2) 
Using rdoc (3.12) 
Installing thor (0.15.2) 
Installing railties (3.2.5) 
Installing rails (3.2.5) 
Installing prototype-rails (3.2.1) 
Installing ruby-openid (2.1.8) 
Installing rack-openid (1.3.1) 
Installing rmagick (2.13.1) with native extensions 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
----------------------
# rake generate_secret_token
rake aborted!
undefined local variable or method `ext_dir' for #<Gem::Specification name=json version=1.7.3>
---------------
I do not understand. How you managed to?


Regards
Comment 39 Bohuslav "Slavek" Kabrda 2012-06-18 01:30:23 EDT
(In reply to comment #37)
> Can you explain the way you succeed?
> 
> I did (with no ruby deps neither yum rubygem or gem):
> * yum install ruby ruby-devel
> * yum install rubygem-bundler
> * yum install rubygem-bigdecimal
> then in the redmine 2.0.2 folder:
> bundle install
> 
> then try to run with a good conf (my working 2.0.0)
> 
> ruby /var/www/redmine/2.0.2/script/rails server webrick -e production &
> 
> but I always have the `method_missing' error
> 
> Regards

Hi Charlie, the update that fixes the bug is still in the updates-testing repository. To update you must use:

# yum update ruby rubygem-bigdecimal --enablerepo=updates-testing

I think I will push this update to stable today, so then it will suffice to run it without the --enablerepo=updates-testing.
Comment 40 Bohuslav "Slavek" Kabrda 2012-06-18 01:33:49 EDT
(In reply to comment #38)
> # gem list
> 
> *** LOCAL GEMS ***
> 
> bigdecimal (1.1.0)
> bundler (1.0.21)
> diff-lcs (1.1.2)
> hashery (1.4.0)
> i18n (0.5.0)
> io-console (0.3)
> json (1.6.5)
> mkrf (0.2.3)
> rake (0.9.2.2)
> rdoc (3.12)
> ruby2ruby (1.2.4)
> ruby_parser (2.0.4)
> sexp_processor (3.0.4)
> thor (0.14.6)
> ---------------------------------------
> # bundle install --without development test postgresql sqlite
> Fetching source index for http://rubygems.org/
> Using rake (0.9.2.2) 
> Installing i18n (0.6.0) 
> Installing multi_json (1.3.6) 
> Installing activesupport (3.2.5) 
> Installing builder (3.0.0) 
> Installing activemodel (3.2.5) 
> Installing erubis (2.7.0) 
> Installing journey (1.0.4) 
> Installing rack (1.4.1) 
> Installing rack-cache (1.2) 
> Installing rack-test (0.6.1) 
> Installing hike (1.2.1) 
> Installing tilt (1.3.3) 
> Installing sprockets (2.1.3) 
> Installing actionpack (3.2.5) 
> Installing mime-types (1.18) 
> Installing polyglot (0.3.3) 
> Installing treetop (1.4.10) 
> Installing mail (2.4.4) 
> Installing actionmailer (3.2.5) 
> Installing arel (3.0.2) 
> Installing tzinfo (0.3.33) 
> Installing activerecord (3.2.5) 
> Installing activeresource (3.2.5) 
> Using bundler (1.0.21) 
> Installing coderay (1.0.6) 
> Installing json (1.7.3) with native extensions 
> Installing mysql2 (0.3.11) with native extensions 
> Installing net-ldap (0.3.1) 
> Installing rack-ssl (1.3.2) 
> Using rdoc (3.12) 
> Installing thor (0.15.2) 
> Installing railties (3.2.5) 
> Installing rails (3.2.5) 
> Installing prototype-rails (3.2.1) 
> Installing ruby-openid (2.1.8) 
> Installing rack-openid (1.3.1) 
> Installing rmagick (2.13.1) with native extensions 
> Your bundle is complete! Use `bundle show [gemname]` to see where a bundled
> gem is installed.
> ----------------------
> # rake generate_secret_token
> rake aborted!
> undefined local variable or method `ext_dir' for #<Gem::Specification
> name=json version=1.7.3>
> ---------------
> I do not understand. How you managed to?
> 
> 
> Regards

Vladimir, do you use the Fedora packaged RubyGems? If so, could you please run

# yum update ruby rubygem-bigdecimal --enablerepo=updates-testing

and then try again?
Comment 41 Vladimir 2012-06-18 15:22:47 EDT
Bohuslav,  I did it:

#yum update ruby rubygem-bigdecimal --enablerepo=updates-testing

I do not poluchiloss:

# rake generate_secret_tokenrake aborted!
undefined local variable or method `ext_dir' for #<Gem::Specification name=json version=1.7.3>

(See full trace by running task with --trace)
------------
Regards
Comment 42 Bohuslav "Slavek" Kabrda 2012-06-19 01:43:01 EDT
(In reply to comment #41)
> Bohuslav,  I did it:
> 
> #yum update ruby rubygem-bigdecimal --enablerepo=updates-testing
> 
> I do not poluchiloss:
> 
> # rake generate_secret_tokenrake aborted!
> undefined local variable or method `ext_dir' for #<Gem::Specification
> name=json version=1.7.3>
> 
> (See full trace by running task with --trace)
> ------------
> Regards

Vladimir, do you use Fedora packaged RubyGems? They have some modifications and currently the standard RubyGems would show these errors.
Also, please could you run

rake --trace generate_secret_token

and paste the output here?
Thanks.
Comment 43 Vladimir 2012-06-19 12:41:06 EDT
(In reply to comment #42)
> (In reply to comment #41)
> > Bohuslav,  I did it:
> > 
> > #yum update ruby rubygem-bigdecimal --enablerepo=updates-testing
> > 
> > I do not poluchiloss:
> > 
> > # rake generate_secret_tokenrake aborted!
> > undefined local variable or method `ext_dir' for #<Gem::Specification
> > name=json version=1.7.3>
> > 
> > (See full trace by running task with --trace)
> > ------------
> > Regards
> 
> Vladimir, do you use Fedora packaged RubyGems? They have some modifications
> and currently the standard RubyGems would show these errors.
> Also, please could you run
> 
> rake --trace generate_secret_token
> 
> and paste the output here?
> Thanks.

Bohuslav,  I did it:

# rake --trace generate_secret_token
rake aborted!
undefined local variable or method `ext_dir' for #<Gem::Specification name=json version=1.7.3>
/usr/local/share/ruby/site_ruby/rubygems/specification.rb:1495:in `method_missing'
/usr/share/gems/gems/bundler-1.0.21/lib/bundler/rubygems_ext.rb:41:in `load_paths'
/usr/share/gems/gems/bundler-1.0.21/lib/bundler/runtime.rb:35:in `block in setup'
/usr/share/gems/gems/bundler-1.0.21/lib/bundler/runtime.rb:17:in `setup'
/usr/share/gems/gems/bundler-1.0.21/lib/bundler.rb:110:in `setup'
/usr/share/gems/gems/bundler-1.0.21/lib/bundler/setup.rb:7:in `<top (required)>'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:60:in `require'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:60:in `rescue in require'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:35:in `require'
/var/www/redmine/config/boot.rb:6:in `<top (required)>'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:36:in `require'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:36:in `require'
/var/www/redmine/config/application.rb:1:in `<top (required)>'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:36:in `require'
/usr/local/share/ruby/site_ruby/rubygems/custom_require.rb:36:in `require'
/var/www/redmine/Rakefile:5:in `<top (required)>'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/bin/rake:32:in `<main>'

Thanks.
Comment 44 Fedora Update System 2012-06-19 20:27:07 EDT
ruby-1.9.3.194-13.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 45 Bohuslav "Slavek" Kabrda 2012-06-20 01:44:33 EDT
Vladimir, your problem seems to be mixing Fedora alternated bundler and non-fedora-alternated rubygems. This is not possible yet (althought we are trying to push our modifications upstream to enable this).
You either have to use both Bundler and RubyGems from Fedora (recommended) or both installed by yourself.
Comment 46 Vladimir 2012-06-20 04:33:22 EDT
Bohuslav, thank you for participating in this issue.
I'll look for a solution.
Thanks.
Comment 47 Bohuslav "Slavek" Kabrda 2012-06-20 08:46:08 EDT
Thank you all for the reports and participation. I'm closing this bug. If you have any other issues, please open a new one.
Comment 48 Bohuslav "Slavek" Kabrda 2012-06-22 01:40:57 EDT
*** Bug 834043 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.