Bharat soni
Bharat soni

Reputation: 2786

NameError (uninitialized constant Mime::XLS):

I am getting the problem on my Ubuntu server, but it works on my local machine completely without any error.

ruby version 1.9.3

rails version 3.2.13

I have done the following configurations:

application.rb

require File.expand_path('../boot', __FILE__)
require 'csv'
require 'rails/all'

/initializers/mime_types.rb

Mime::Type.register "application/xls", :xls
#Mime::Type.register "application/vnd.ms-excel", :xls

I have got the reference from here

Upvotes: 6

Views: 2896

Answers (1)

Bharat soni
Bharat soni

Reputation: 2786

Finally solve the problem

The problem occur because at that time we are running the application on server in daemon mode with it's IP, we didn't bind the application with Phusion Passenger and Apache.

And for that work we were always restart the Apache server and testing the changes but the config folder is always boot with application when we start the server.

I am posting the answer for someone for help if they got same problem.

Upvotes: 4

Related Questions