Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 555
Bharat soni Avatar asked Jan 01 '14 06:01

Bharat soni


1 Answers

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.

like image 134
Bharat soni Avatar answered Sep 23 '22 13:09

Bharat soni