Project

General

Profile

Actions

Defect #10805

closed

json gem needed in Gemfile. BitBucket / GitHub Hook Plugins giving Internal Server Errors

Added by Peter Sanchez over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I upgraded from 1.3.3 to 1.4.1 and I noticed that the Bitbucket Hook plugin stopped working.

Plugin is here: https://bitbucket.org/nolith/redmine-bitbucket

I added the needed routes from here: https://bitbucket.org/Paaashka/redmine-bitbucket

But I started getting 500 errors about not being able to load the json gem.

Here is the error I would receive:

MissingSourceFile (no such file to load -- json):
vendor/plugins/redmine-bitbucket/app/controllers/bitbucket_hook_controller.rb:1
thin (1.2.11) lib/thin/connection.rb:84:in `pre_process'
thin (1.2.11) lib/thin/connection.rb:82:in `catch'
thin (1.2.11) lib/thin/connection.rb:82:in `pre_process'
thin (1.2.11) lib/thin/connection.rb:57:in `process'
thin (1.2.11) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.11) lib/thin/backends/base.rb:61:in `start'
thin (1.2.11) lib/thin/server.rb:159:in `start'
thin (1.2.11) lib/thin/controllers/controller.rb:86:in `start'
thin (1.2.11) lib/thin/runner.rb:185:in `send'
thin (1.2.11) lib/thin/runner.rb:185:in `run_command'
thin (1.2.11) lib/thin/runner.rb:151:in `run!'
thin (1.2.11) bin/thin:6
/usr/local/bin/thin:19:in `load'
/usr/local/bin/thin:19

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error

I'm not very familiar with Ruby, gem files, bundle, etc. But I looked at the Gemfile and noticed json wasn't listed. So I added the following line:

--- a/Gemfile Fri Apr 20 10:00:58 2012 0000
++ b/Gemfile Tue May 01 08:26:58 2012 -0700
@ -5,6 +5,7 @
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "tzinfo", "~> 0.3.31"
+gem "json", "~> 1.6.5"

  1. Optional gem for LDAP authentication
    group :ldap do

and reran bundle like so:

bundle install --without development test mysql sqlite

Then I ran the plugin migration, just in case:

rake db:migrate_plugins RAILS_ENV=production

Restarted the thin webserver, tested the plugin, and everything is working again. Looks like json needs to be added to the Gemfile?

About my setup:

About your application's environment
Ruby version 1.8.7 (amd64-freebsd8)
RubyGems version 1.8.15
Rack version 1.1.3
Rails version 2.3.14
Active Record version 2.3.14
Active Resource version 2.3.14
Action Mailer version 2.3.14
Active Support version 2.3.14
Application root /usr/local/www/redmine
Environment production
Database adapter postgresql
Database schema version 20120301153455

About your Redmine plugins
Redmine Bitbucket Hook plugin 0.1.2

Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

If this plugin requires a gem, it should declare it in its own Gemfile at the root of the plugin directory.
Please contact the plugin author.

Actions

Also available in: Atom PDF