Displaying 20 results from an estimated 20000 matches similar to: "Problem with custom Mime::Type.register."
2006 Jun 08
0
custom mime types for respond_to
Is there a way to add a mime type of my own to respond_to ?
There''s html, xml, js, ical etc ...
But I want to be able to respond_to Excel.
Excel has the following content-type header:
application/vnd.ms-excel
I want to use the new ?format=xml querystring parameters that respond_to
can respond to.
So I want to pass in ?format=xsl or ?format=ms-excel so that I can
return my results
2008 May 08
5
Simple Generated Component Suddenly Gives Errors
What am I doing wrong here when I wrote a very simple component so :
C:\ruby\letter4sure>ruby script\generate scaffold pso_printers
printing_setting_id:integer pso_id:integer
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/pso_printers
...
Then I did a rake db:migrate
And then I simply went to take a look at the url for the above :
2013 Feb 10
0
Nested attributes doesnt get updated
Hi
Am building a nested form and my code works fine with sqlite3 but throws
errors when using Oracle during update action.
Am getting the following error:
ActiveRecord::RecordNotFound in AWRequestsController#update
Couldn''t find WADetail with ID=5000000015 for AWRequest with ID=5000000022.0
Request
*Parameters*:
{"utf8"=>"✓",
2008 May 13
0
Problem geting web interface to work
Hi,
i have installed CruiseControlRB 1.3.0. With no project added the web interface at localhost:3333 looks find.
I have successfully added one of my projects (batch file which builds some c++ code) which is also building fine.
But the web interface is no more working - i get the following message "Errno::EINVAL in Projects#index".
I have attached a log (run with --trace) which
2009 Apr 03
7
RJS not rendering correctly when mime-type is 'iphone'
I have an iPhone version of my site, and for some reason none of the
rjs works when viewing the iPhone version. This happens instead:
ActionView::MissingTemplate (Missing template controller_name/
update.erb in view path app/views)
The rjs works fine when viewing the site normally, and it worked when
viewing the iPhone version prior to upgrading Rails to 2.3.2.
Additional info: I have
2007 Feb 26
2
Problem concerning CSV Mime Type
Hello,
I have an application that should be able to export a list of users as
CSV.
So I put
Mime::Type.register "text/csv", :csv
into my environment.rb, and added this code to my UserController''s index
action:
format.csv do
require ''csv''
CSV::Writer.generate(csv_string = "", '','') do |csv|
csv
2010 Sep 05
0
Responding to a non-registered MIME type?
I''m trying to figure out how attachments are supposed to work with MIME
type-based responses. What makes attachments special is that in many
cases they are allowed to be arbitrary files. It would be too
restrictive to require that all possible types are registered
(Mime::Type.register).
Let''s say for GET requests on an attachment resource I want to return
metadata if the
2009 Feb 03
3
ROXML from_xml not returning an object instance...
Hello,
I have two ActiveRecord classes. One is Route the other is Waypoints.
I have constructed an XML representation so I can use AJAX to create a
Route with all waypoints in a single create call to RouteController.
When I call Route.from_xml(xmlString) it is not returning an object -
it''s leaving the object (@route) nil, but not erroring. Any ideas?
Here''s some code:
2009 Dec 16
1
php and mime type
Hi list,
I'm hoping to find a way via php, preferably without using exec() or
system(), to reliably identify an ogg vorbis file via php.
Using
$fi = new finfo(FILEINFO_MIME);
$mime_type = $fi->buffer(file_get_contents($upload));
results in 'application/ogg'
My site accepts vouchers for herpetology records, but only image and
audio. I do not wish to support video vouchers, but
2007 Jun 28
1
DRb server crashing
I''m having a problem where the DRb server seems to be disappearing
(crashing?) and I don''t know how to track down the cause or work around
the problem.
Unfortunately I haven''t found a way to reproduce the problem, but it
seems to happen fairly often (maybe once a day). Other then that ferret
seems to be working well.
I can''t seem to find any trace of the
2008 May 05
2
Deploying to a staging server using Capistrano: how to start up BackgrounDRb?
Hi.
I am using BackgrounDRb to process thumbnails and upload to S3 -
things are hunky-dory in development (thumbs are generated, these are
uploaded to S3, the metadata is saved to trhe DB, and I get a nice
status page updated by periodic calls via ask_status), but when I
tried to deploy to our staging server and stop/start BackgrounDRb via
Capistrano, things blew up - well, not exactly,
2008 Mar 07
0
Extended Mime Responder functionality
Using custom mime types, I''ve run into instances where I end up
calling the same function over and over again for a specific type.
After a little tweaking I came up with a monkey patch that allows to
pass a default block at mimetype registration time, and allows
responder block calls to take arguments. I uploaded the monkey patch
so let me know your thoughts. It currently only works for
2008 Jan 16
0
respond_to, mime types and excel
Hello All,
I''m trying to figure out how respond_to actually works, especially with
the increased focus on REST.
After I set a MIME type for Excel
Mime::Type.register "application/vnd.ms-excel", :xls
In my index action''s respond_to block
I have format.xls {
@parts = Part.find(:all)
headers[''Content-Type''] =
2011 May 19
0
Unable to find the image path via file system using the paperclip plugin through the get method
Hello all,
with great difficulty , I guess I have finally been able to find the
appropriate git commit of paperclip which would suit my project''s config
which is Ruby 1.8.7 and rails 2.0.2.
I am trying to implement a POC before I integrate paperclip in my
project. The POC is basically implementing each post with an appropriate
image beside it. It seems to pretty much work, its just
2007 Aug 21
2
ActionPack raw_post_data_fix.rb#read_body bug with AMF data.
Hey Everyone,
I just found a slight problem with the "read_body" method in
raw_post_data_fix.rb.
This line:
# Fix for Safari Ajax postings that always append \000
content.chop! if content[-1] == 0
This causes problems with Flash AMF binary format. As AMF always appends
a \000 to the stream as well. I''m the developer over at RubyAMF and have
been running into problems with AMF
2008 Apr 25
1
attachment_fu and mime type issues
Hi All,
I am having a problem with the attachment_fu plugin and flac audio files. In
the dev environment, using mongrel, the form upload object does not seem to
have any associated content_type. I get the following attachment_fu
validation error: "Content type can''t be blank". I don''t understand why the
file_data would not have any content_type. Doesn''t rails
2009 May 07
1
Paperclip: strange mime type on windows
When i upload a pdf, validations doesn''t work, only images validation
works. Avoiding check, file was loaded but with this content type:
file_content_type: "binary/octet-stream"
How can i solve? I''d like to have "application/pdf"
--
Posted via http://www.ruby-forum.com/.
2007 Aug 21
7
rails truncating raw_post_data?
Has anyone ever run into any problems with rails truncating
raw_post_data. My situation is this: I''m the developer for RubyAMF
(wiki.rubyamf.org). Which is a flash remoting application server. With
the rails plugin, it allows flash to talk to a controller and return AMF
data..
So long story short, the flash player makes a request to a rails
controller sending AMF binary format in the
2009 Jan 18
2
InvalidAuthenticityToken error with remote_form_for
Hi All -
I have a form_for that I''m trying to convert to remote_form_for, and I
keep get this error:
ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/request_forgery_protection.rb:86:in
`verify_authenticity_token''
2015 Apr 22
2
semi-OT: t-bird mime type on .pdf attachment is wrong
I was sending my manager a copy of a form, and attached it (not inline),
using -t-bird, and he complains it didn't want to open. Looking at the
message source, t-bird had decided that the mime type was all/allfiles,
though the name ended in .pdf. I've searched via the config editor, and
I've been googling, and not finding anything. (I just *adore* the current
google: I have