#StackBounty: #ruby-on-rails #ruby #ruby-on-rails-5 Precompile Rails 5 to Include all Assets

Bounty: 50

I am trying to precompile all of my assets for production. When I run RAILS_ENV=production bundle exec rake assets:precompile not all of my assets are precompiling. I have tried to use the methods that others have suggested in other similar questions but they have not worked for me. For starters here is what my assets.rb looks like:

Rails.application.config.assets.version = '1.0'


Rails.application.config.assets.paths << Rails.root.join('node_modules')



Rails.application.config.assets.precompile += %w(creative/manifest.js creative/manifest.css images/* bootstrap/* fonts/* magnific-popup/* morphext/* owlcarousel2/* rs-plugin-5/* stylesheets/* javascripts/*)

As you can see where I am precompiling I have tried to add for example directory/* to include everything. Here are the files I am trying to include and everything in them (These are in the Assets directory):

bootstrap  
fonts   
javascripts     
morphext      
rs-plugin-5
config     
images  
magnific-popup  
owlcarousel2  
stylesheets

Here is what is precompiling in my public directory when I run the precompile take a look at the image under public and as you can see many of the directories are not in there I have even opened up each folder to see if they are in another folder and no nothing is there:

 public directory

The last part is when I run rails s -e production and I navigate to Localhost:3000 I keep getting a 500 error and nothing is showing. There are no errors in the console in chrome nor the terminal so I cannot see what my page would look like locally for production. Any help will be greatly appreciated.

Update

Here is my production.log it looks like it is not getting the necessary assets:

I, [2017-09-12T18:43:54.606853 #7393]  INFO -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c] Started GET "/" for 127.0.0.1 at 2017-09-12 18:43:54 -0700
I, [2017-09-12T18:43:54.625461 #7393]  INFO -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c] Processing by CreativesController#index as HTML
I, [2017-09-12T18:43:54.642161 #7393]  INFO -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c]   Rendering creatives/index.html.erb within layouts/application
I, [2017-09-12T18:43:54.644418 #7393]  INFO -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c]   Rendered creatives/index.html.erb within layouts/application (2.1ms)
I, [2017-09-12T18:43:54.644629 #7393]  INFO -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c] Completed 500 Internal Server Error in 19ms
F, [2017-09-12T18:43:54.645433 #7393] FATAL -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c]   
F, [2017-09-12T18:43:54.645478 #7393] FATAL -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c] ActionView::Template::Error (The asset "AdobeStock_95578405.jpeg" is not present in the asset pipeline.):
F, [2017-09-12T18:43:54.645761 #7393] FATAL -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c]     17:                 <li data-transition="slidehorizontal" data-slotamount="default" data-masterspeed="default" data-title="Next Generation Care">
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     18:                 
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     19:                 <!-- main image -->
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     20:                 <%= image_tag "AdobeStock_95578405.jpeg" ,alt: "slidebg1", :data => {bgposition: "center bottom",bgrepeat: "no-repeat", bgfit: "cover"} , :class => "rev-slidebg" %>
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     21: 
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     22:                 <!-- Transparent Background -->
[b2f4fb53-c1ea-4d59-8045-44167c60416c]     23:                 <div class="tp-caption dark-translucent-bg"
F, [2017-09-12T18:43:54.645799 #7393] FATAL -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c]   
F, [2017-09-12T18:43:54.645828 #7393] FATAL -- : [b2f4fb53-c1ea-4d59-8045-44167c60416c] app/views/creatives/index.html.erb:20:in `_app_views_creatives_index_html_erb___200307797594027740_70304554688000'
I, [2017-09-12T18:43:54.734601 #7393]  INFO -- : [8f353cbb-4884-4c2c-896d-ba60b58caa61] Started GET "/favicon.ico" for 127.0.0.1 at 2017-09-12 18:43:54 -0700
F, [2017-09-12T18:43:54.735010 #7393] FATAL -- : [8f353cbb-4884-4c2c-896d-ba60b58caa61]   
F, [2017-09-12T18:43:54.735048 #7393] FATAL -- : [8f353cbb-4884-4c2c-896d-ba60b58caa61] ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
F, [2017-09-12T18:43:54.735071 #7393] FATAL -- : [8f353cbb-4884-4c2c-896d-ba60b58caa61]   
F, [2017-09-12T18:43:54.735100 #7393] FATAL -- : [8f353cbb-4884-4c2c-896d-ba60b58caa61] actionpack (5.1.3) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] actionpack (5.1.3) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] railties (5.1.3) lib/rails/rack/logger.rb:36:in `call_app'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] railties (5.1.3) lib/rails/rack/logger.rb:24:in `block in call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] activesupport (5.1.3) lib/active_support/tagged_logging.rb:69:in `block in tagged'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] activesupport (5.1.3) lib/active_support/tagged_logging.rb:26:in `tagged'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] activesupport (5.1.3) lib/active_support/tagged_logging.rb:69:in `tagged'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] railties (5.1.3) lib/rails/rack/logger.rb:24:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] actionpack (5.1.3) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] actionpack (5.1.3) lib/action_dispatch/middleware/request_id.rb:25:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] rack (2.0.3) lib/rack/method_override.rb:22:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] rack (2.0.3) lib/rack/runtime.rb:22:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] activesupport (5.1.3) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] actionpack (5.1.3) lib/action_dispatch/middleware/executor.rb:12:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] railties (5.1.3) lib/rails/engine.rb:522:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] puma (3.10.0) lib/puma/configuration.rb:225:in `call'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] puma (3.10.0) lib/puma/server.rb:437:in `process_client'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] puma (3.10.0) lib/puma/server.rb:301:in `block in run'
[8f353cbb-4884-4c2c-896d-ba60b58caa61] puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
I, [2017-09-12T18:43:58.249911 #7393]  INFO -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26] Started GET "/" for 127.0.0.1 at 2017-09-12 18:43:58 -0700
I, [2017-09-12T18:43:58.251066 #7393]  INFO -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26] Processing by CreativesController#index as HTML
I, [2017-09-12T18:43:58.252212 #7393]  INFO -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26]   Rendering creatives/index.html.erb within layouts/application
I, [2017-09-12T18:43:58.253079 #7393]  INFO -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26]   Rendered creatives/index.html.erb within layouts/application (0.7ms)
I, [2017-09-12T18:43:58.253250 #7393]  INFO -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26] Completed 500 Internal Server Error in 2ms
F, [2017-09-12T18:43:58.254061 #7393] FATAL -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26]   
F, [2017-09-12T18:43:58.254123 #7393] FATAL -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26] ActionView::Template::Error (The asset "AdobeStock_95578405.jpeg" is not present in the asset pipeline.):
F, [2017-09-12T18:43:58.254377 #7393] FATAL -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26]     17:                 <li data-transition="slidehorizontal" data-slotamount="default" data-masterspeed="default" data-title="Next Generation Care">
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     18:                 
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     19:                 <!-- main image -->
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     20:                 <%= image_tag "AdobeStock_95578405.jpeg" ,alt: "slidebg1", :data => {bgposition: "center bottom",bgrepeat: "no-repeat", bgfit: "cover"} , :class => "rev-slidebg" %>
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     21: 
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     22:                 <!-- Transparent Background -->
[2e6342ac-ec61-410c-98ba-ae205fb9cc26]     23:                 <div class="tp-caption dark-translucent-bg"
F, [2017-09-12T18:43:58.254415 #7393] FATAL -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26]   
F, [2017-09-12T18:43:58.254442 #7393] FATAL -- : [2e6342ac-ec61-410c-98ba-ae205fb9cc26] app/views/creatives/index.html.erb:20:in `_app_views_creatives_index_html_erb___200307797594027740_70304554688000'


Get this bounty!!!

#StackBounty: #ruby #unit-testing #ruby-on-rails #rspec Rails CRUD feature specs (RSpec and Capybara)

Bounty: 50

The following feature spec tests CRUD operations for the users resource in a Rails 4.2.8 application. It includes tests for filtering, sorting and pagination features of the index view.

The tests work. However, I would greatly appreciate your feedback and suggestions on how to improve the specs (e.g., efficiency, readability, maintainability, DRYness).

In the index view, the data is displayed within a table. In the show view, it is displayed within a definition list (<dl> tag).

# spec/features/user_crud_spec.rb
require "rails_helper"

def find_by_i18n_title(i18n_key)
  # Bootstrap renames the "title" attribute to "data-original-title"
  find("[data-original-title='#{I18n.t(i18n_key)}']")
end

# Select items from select2 dropdowns. https://select2.github.io/
def select_select2_option(option_text)
  first('.select2-container').click
  find('li', text: option_text).click
end

# Inspired by https://stackoverflow.com/a/45287911/6307730
def sort_order_regex(*sort_by_attributes)
  /#{User.order(sort_by_attributes)
         .map { |u| Regexp.quote(u.email) }
         .join(".+")}/
end

RSpec.shared_examples "sort link" do |link_text:, sort_by:|
  it "sorts by #{sort_by} when the #{link_text} link is clicked" do
    # Trigger the lazy creation of 2 more records, total count is now 3
    users
    visit admin_users_path
    # Check the record's order by matching the order of their e-mails (unique).
    initial_order = sort_order_regex(:first_name, :last_name)
    tested_order = sort_order_regex(sort_by)
    within_table "users_table" do
      expect(page).to have_text(initial_order)
      click_link(link_text, exact: false)
      expect(page).to have_text(tested_order)
    end
  end
end

RSpec::Matchers.define :have_single_record do |slug|
  match do |page|
    expect(page).to have_selector("tr.user", count: 1)
    expect(page).to have_selector("tr#user_#{slug}")
  end
  failure_message do |page|
    "expected to find a single record in the page with slug #{slug}. " 
    "Found #{page.all("tr#user_#{slug}").count} records instead."
  end
end

describe "User admin CRUD", type: :feature, js: true do
  let(:user) { FactoryGirl.create(:admin_user) }
  let(:user_with_associations) do
    user = FactoryGirl.create(:user)
    masters = FactoryGirl.create_pair(:master, users: [user])
    # Quote requires an associated user to be valid. The :quote factory creates
    # a user unless we pass an existing one as an argument.
    FactoryGirl.create(:quote, master: masters.first, user: user)
    user
  end
  let(:valid_attributes) { FactoryGirl.attributes_for(:user) }

  before(:each) { login_as(user) }

  describe "Index view" do
    let(:users) { FactoryGirl.create_pair(:user) << user }

    it "displays all existing users" do
      # Trigger the lazy creation of one more user with associations (to
      # ensure the associations appear in the index page)
      users = [user, user_with_associations]

      visit admin_users_path
      expect(page).to have_selector("tr.user", count: users.count)

      users.each do |user|
        # <tr> must have user_x (x is the record slug) as DOM ID
        within("#user_#{user.slug}") do
          # OPTION 1
          expected_regex = /#{[
            user.email,
            user.role,
            user.full_name,
            CS.countries[user.country.to_sym],
            user.sangha,
            user.masters.map(&:name).join(' '),
            user.quotes_count
          ].join(".*")}/
          expect(page).to have_text expected_regex

          # OPTION 2
          # requires <td>s to have their corresponding attribute names as a DOM class
          # expect(page).to have_selector ".email", text: user.email
          # expect(page).to have_selector ".role", text: user.role
          # expect(page).to have_selector ".full_name", text: user.full_name
          # expect(page).to have_selector ".country",
          #                               text: CS.countries[user.country.to_sym]
          # expect(page).to have_selector ".sangha", text: user.sangha
          # expect(page).to have_selector ".masters",
          #                               text: user.masters.map(&:name).join(' ')
          # expect(page).to have_selector ".quotes_count",
          #                               text: user.quotes_count
        end
      end
    end

    it "loads the show view when the 'show' icon is clicked" do
      visit admin_users_path
      find_by_i18n_title("actions.show").click
      expect(page).to have_current_path(admin_user_path(user))
    end

    it "loads edit view when the 'edit' icon is clicked" do
      visit admin_users_path
      find_by_i18n_title("actions.edit").click
      expect(page).to have_current_path(edit_admin_user_path(user))
    end

    it "destroys the user when the 'delete' icon is clicked" do
      # Create a new user so the logged-in user does not get deleted
      user = FactoryGirl.create(:user)
      visit admin_users_path
      expect do
        within("#user_#{user.slug}") do
          page.accept_alert I18n.t("are_you_sure") do
            find_by_i18n_title("actions.delete").click
          end
        end
        # Redirect back to the index view after record is destroyed.
        # Must be inside the #expect block to ensure the DB operation is
        # finished before trying to count records.
        expect(page).to have_current_path(admin_users_path)
      end.to change(User, :count).by(-1)
    end

    describe "sorting" do
      include_examples "sort link", link_text: "E-mail", sort_by: :email
      include_examples "sort link", link_text: "Role", sort_by: :role
      include_examples "sort link", link_text: "Country", sort_by: :country
      include_examples "sort link", link_text: "Sangha", sort_by: :sangha
      include_examples "sort link", link_text: "Quotes", sort_by: :quotes_count
    end

    describe "filtering" do
      it "filters by email" do
        # Trigger the lazy creation of 2 additional records. E-mails are unique.
        users
        visit admin_users_path
        fill_in "q_email_cont", with: user.email
        click_button "email_search_submit"
        expect(page).to have_single_record(user.slug)
        # Test the filter's "Clear" button
        click_on "Clear"
        expect(page).to have_selector("tr.user", count: users.count)
      end

      it "filters by full_name" do
        # The logged in user (created by let!(:user)) has a different name
        user = FactoryGirl.create(:user,
                                  first_name: "Unique",
                                  last_name: "Name")
        visit admin_users_path
        expect(page).to have_selector("tr.user", count: 2)
        fill_in "q_full_name_cont", with: "Unique Name"
        click_button "email_search_submit"
        expect(page).to have_single_record(user.slug)
      end

      it "filters by role" do
        # The logged in user (created by let!(:user)) has :admin role
        user = FactoryGirl.create(:user, role: :user)
        visit admin_users_path
        expect(page).to have_selector("tr.user", count: 2)
        select "user", from: "q_role_eq"
        # It auto-submits
        expect(page).to have_single_record(user.slug)
      end

      it "filters by country" do
        # The country of the logged in user is not "TH" (see the factory)
        user = FactoryGirl.create(:user, country: "TH")
        visit admin_users_path
        expect(page).to have_selector("tr.user", count: 2)
        select "Thailand", from: "q_country_eq"
        # It auto-submits
        expect(page).to have_single_record(user.slug)
      end

      it "filters by master (select box)" do
        # The logged in user (created by let!(:user)) has no masters
        master = FactoryGirl.create(:master)
        user = FactoryGirl.create(:user, masters: [master])
        visit admin_users_path
        expect(page).to have_selector("tr.user", count: 2)
        select master.name, from: "q_masters_name_cont"
        # It auto-submits
        expect(page).to have_single_record(user.slug)
      end
    end

    describe "pagination" do
      before(:all) do
        # Temporarily reduce the limit of users per page to avoid having to
        # create a large number of records.
        @original_max_per_page = Kaminari.config.default_per_page
        Kaminari.config.default_per_page = 2
      end

      after(:all) do
        # Restore original pagination settings
        Kaminari.config.default_per_page = @original_max_per_page
      end

      context "with a single record" do
        it "does not paginate" do
          visit admin_users_path
          expect(page).to have_selector("tr.user", count: 1)
          expect(page).to have_no_selector("ul.pagination")
        end
      end

      context "with 3 records and maximum records per page set to 2" do
        before(:each) do
          # Trigger the lazy creation of 2 more records, total count is now 3
          users
          visit admin_users_path
        end

        it "displays 2 records in the 1st page " do
          expect(page).to have_selector("ul.pagination")
          expect(page).to have_selector("tr.user", count: 2)
        end

        it "displays 1 record in the 2nd page" do
          within "ul.pagination" do
            click_link "2"
          end
          expect(page).to have_current_path(admin_users_path + "?page=2")
          expect(page).to have_selector("tr.user", count: 1)
        end
      end
    end
  end

  describe "#new view" do
    it "creates a new user" do
      visit new_admin_user_path
      expect do
        # Implemented in spec/support/helpers/capybara_fill_user_fields.rb
        fill_user_fields(valid_attributes)
        click_button "Create User"
        # Keep this inside the expect block to ensure it waits until the new
        # record is created before recounting records.
        expect(page).to have_current_path(admin_user_path(User.last))
      end.to change(User, :count).by(1)
      expect(page).to have_text "successfully created."
      expect(page).to have_text "Name #{valid_attributes[:first_name]}"
    end
  end

  describe "#show view" do
    it "displays all public attributes" do
      # Create a record with all associations to ensure they appear on the
      # #show view
      user = user_with_associations
      visit admin_user_path(user)
      [
        "E-mail #{user.email}",
        "Role #{user.role}",
        "Full Name #{user.full_name}",
        "Sangha #{user.sangha}",
        "Country #{CS.countries[user.country]}",
        "State #{CS.states(user.country)[user.state]}",
        "City #{user.city}",
        "Phone Number #{user.phone_number}",
        "Facebook URL #{user.facebook_url}",
        "Masters #{user.masters.map(&:name).join(' ')}",
        "Quotes #{user.quotes_count.to_s}"
      ].each do |text|
        expect(page).to have_text text
      end
    end
  end

  describe "#edit view" do
    it "allows an admin to update all public attributes of the user" do
      # create two masters to be selected in the "Masters" multiselect box.
      masters = FactoryGirl.create_pair(:master)
      visit edit_admin_user_path(user)
      # Implemented in spec/support/helpers/capybara_fill_user_fields.rb
      fill_user_fields(valid_attributes)
      # Select 2 items from the "Masters" select box
      masters.each { |master| select_select2_option(master.name) }
      click_button "Update User"
      expect(page).to have_current_path(admin_user_path(User.last))
      expect(page).to have_text "successfully updated."
      expect(page).to have_text "Name #{valid_attributes[:first_name]}"
    end
  end
end


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!

#StackBounty: #server #apache2 #ruby #ruby-on-rails #redmine Redmine can't work on apache2 with passenger: incompatible library ver…

Bounty: 100

I want to install redmine on my PC. I worked with tutorials from http://redmine.org/ to deploy redmine on my PC. After installing ruby, additional packages and redmine, I want to configure apache2 for redmine. But have an issue after accessing to app:

Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so

I have installed ruby on rails via rvm:

oleg@oleg-VirtualBox ~ $ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
oleg@oleg-VirtualBox ~ $ rails -v
Rails 4.2.8

installed libapache2-mode-passenger with /etc/apache2/mods-available/passenger.conf config:

<IfModule mod_passenger.c>
  PassengerUserSwitching on 
  PassengerUser redmine
  PassengerGroup redmine
  PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
  PassengerDefaultRuby /usr/bin/ruby
</IfModule>

and config for redmine:

<VirtualHost *:80>
    DocumentRoot /var/www/html/redmine/
    ServerName redmine.local

    <Directory /var/www/html/redmine/>
        PassengerResolveSymlinksInDocumentRoot on
        AllowOverride all
        Options -MultiViews
        Options FollowSymLinks
        RailsBaseURI /redmine
    </Directory>
</VirtualHost>

Apache error log:

[ 2017-07-04 13:53:21.9413 1661/7f51d8495700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /opt/redmine/redmine: An error occurred while starting up the preloader.
  Error ID: 28c6ac21
  Error details saved to: /tmp/passenger-error-GYyEzF.html
  Message from application: incompatible library version - /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri/nokogiri.so (LoadError)
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:32:in `rescue in <top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/nokogiri-1.7.2/lib/nokogiri.rb:28:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie/inliner.rb:2:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-3.2.2/lib/roadie.rb:29:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie/rails.rb:6:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/roadie-rails-1.1.1/lib/roadie-rails.rb:1:in `<top (required)>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:77:in `block in require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `each'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler/runtime.rb:66:in `require'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/bundler-1.15.1/lib/bundler.rb:108:in `require'
  /opt/redmine/redmine-3.3.4/config/application.rb:5:in `<top (required)>'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `require'
  /opt/redmine/redmine-3.3.4/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /opt/redmine/.rvm/gems/ruby-2.3.3/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-07-04 13:53:21.9466 1661/7f51d3fff700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 28c6ac21. Please see earlier logs for details about the error.

File nokogiri.so is present in folder.

If run rails server, redmine starts and works well.

Is anybody know how to fix problem?


Get this bounty!!!