"There was an error while trying to load the gem 'mysql2'. (Bundler::GemRequireError)" error shows up after redmine installation
<p>I'm transferring redmine from our office's local server to an online server so that anyone who deals with bug management doesn't need to have a VPN account to access redmine.</p>

<p>So, We've chosen to use Bluehost.com because we saw their default Ruby version is 1.9.3(which works with redmine) while other hosts we've checked out were at 1.8.7</p>

<p>Okay I'm done establishing the backstory, now to the main storyline:</p>

<p>I'm trying for several days to install redmine on the server with no success.
The error I'm getting is this:
Error Message:</p>

<blockquote>
  <p>There was an error while trying to load the gem 'mysql2'.
  (Bundler::GemRequireError)</p>
  
  <p>Exception Class: PhusionPassenger::UnknownError</p>
</blockquote>

<p>Here are some details:</p>

<p>Ruby version 1.9.3
Redmine version 3.2.2
Rails Version 4.2.5.2(installed as part of the bundle for redmine)
MySQL version 5.5.42</p>

<p>I've used a few guides on the web on how to install redmine on the server. one of whom was bluehost's guide:
<a href="https://my.bluehost.com/cgi/help/redmine" rel="nofollow">https://my.bluehost.com/cgi/help/redmine</a></p>

<p>What I've tried after thoroughly searching StackOverflow:</p>

<ul>
<li>I read that sometimes mysql2 gems have a problem and need to be reinstalled again after the bundle so I did <code>gem install mysql2</code></li>
<li>I tried installing a specific version as well when someone here said that the mysql2 gem was working with bluehost on version 0.3.16 or other similar versions. Didn't work.</li>
<li>I even tried installing a local newer version of Ruby 2.3.1 but that didn't work either and only after I realized that the gems are not necessarily affected by the ruby version installed on the system.</li>
<li>I can't even use the test feature (like with WEBrick or Thin) because Bluehost wants you to own a dedicated server in order to open up special ports for you. We're using a shared host.</li>
</ul>

<p>Anyway, after around 4 days of dealing with this I came to the conclusion that I need to seek out help. Sure I did learn practically the syntax of Ruby on Rails while dealing with this problem(which I was clueless on and have no knowledge in Ruby itself) but I need to get this done. </p>

<p>Does anyone have any insight on things I can try to get this working?
Here's a shot of the error:
<a href="http://i.stack.imgur.com/KdNuI.png" rel="nofollow">Passenger Error</a></p>

<p>production.log data:</p>

<pre><code>Migrating to InsertAllowedStatusesForNewIssues (20150725112753)
Migrating to CreateImports (20150730122707)
Migrating to CreateImportItems (20150730122735)
Migrating to ChangeTimeEntriesCommentsLimitTo1024 (20150921204850)
Migrating to ChangeWikiContentsCommentsLimitTo1024 (20150921210243)
Migrating to ChangeAttachmentsFilesizeLimitTo8 (20151020182334)
Migrating to FixCommaInUserFormatSettingValue (20151020182731)
Migrating to ChangeIssueCategoriesNameLimitTo60 (20151021184614)
Migrating to ChangeAuthSourcesFilterToText (20151021185456)
Migrating to ChangeUserPreferencesHideMailDefaultToTrue (20151021190616)
Migrating to AddTokensUpdatedOn (20151024082034)
Migrating to CreateCustomFieldEnumerations (20151025072118)
Migrating to AddProjectsDefaultVersionId (20151031095005)
</code></pre>

<p>in comparison, development.log is huge so I'll add a portion of it just to demonstrate the type of things written there.
I can access the cpanel and donwload the entire file if needed:</p>

<pre><code>'  ^[[1m^[[36m (0.2ms)^[[0m  ^[[1mSHOW CREATE TABLE `wikis`^[[0m
  ^[[1m^[[35m (0.3ms)^[[0m  SELECT fk.referenced_table_name as 'to_table'
      ,fk.referenced_column_name as 'primary_key'
      ,fk.column_name as 'column'
      ,fk.constraint_name as 'name'
FROM information_schema.key_column_usage fk
WHERE fk.referenced_column_name is not null
  AND fk.table_schema = 'skredmin_redmine2'
  AND fk.table_name = 'workflows'
</code></pre>

<p>Thanks for any insight!</p>