Displaying 20 results from an estimated 600 matches similar to: "Looking for a good resource on open-uri and FileUtils"
2009 May 20
3
ffmpeg + mp3 convert
Hi all,
I am using paperclip plugin to upload mp3''s. Before I save the mp3 I
would like to convert it to a smaller size.
I am using ffmpeg library and in my Track model I am calling:
before_save :convert_mp3
def convert_mp3
system("ffmpeg -i #{mp3.to_file.path} -vn -ar 44100 -ac 2 -ab 64 -f
mp3 #{mp3.to_file.path}")
end
But this fails. Am I missing something?
2007 Dec 03
4
How to remember if a div is shown or hidden after a page ref
Hi everyone, hi have a similar problem in a view:
<div id="content">...</div>
<a href="javascript:void(0)"
onClick="Effect.Toggle(''content'');">Hide/show content</a>
I would like the page to "remember" that the div has been hidden after a
page reload.
(The div comes up always visible even if it was set to hidden
2009 Jul 07
2
paperclip unit testing
Hi,
Rails 2.3.2, paperclip 2.2.9.2
How can I unit test my model that has a paperclip attachment?
I add to my model:
--- CODE START ---
has_attached_file :image, :default_url => ''''
attr_protected :image_file_name, :image_content_type, :image_image_size
--- CODE END ---
Than I type a UNIT test:
--- CODE START ---
foo=FooModel.new({:image =>
2006 Jun 19
0
FileUtils/ActiveRecord help please?
Does anybody know how to make FileUtils and ActiveRecord coexist? Every
attempt I have made results in errors like those quoted below.
[belladonna-grr] ~ <0> irb
irb(main):001:0> require ''rubygems''
=> true
irb(main):002:0> require ''fileutils''
=> true
irb(main):003:0> include FileUtils
=> Object
irb(main):004:0> require_gem
2009 Sep 15
1
Strange error no idea -fileutils.rbThumbs.db (Errno::EACCES)
I can not find a single post on this but trying to start mongrel_rails
after closing it down I get the strangest error I have ever seen.
Nothing on Google anywhere at all - please can somebody give some
expertise?
D:\2_Rails_WWW\rails_apps\footballstars>mongrel_rails start
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
2006 Jun 14
2
Simple FileUtils question
Hi, I have a quick question. I am trying to create folders dinamically
using FileUtils.mkdir, the problem is that if the folder already exist
it gives me an error. Does anyone know if there are any options to mkdir
that would let me overwrite the already existing directory? I just need
to create a folder with the same name everytime. Any other solution you
might suggest? Thanks.
--
Posted
2011 Jul 11
0
stuck with permissions in using FileUtils
Even if I am using PaperClip & Delayed_job, I guess the issue maybe
solved by FileUtisl gurus ...
here is the case :
I am testing a delayed video format transcoding , transcoding works
perfectly but I get an issue -trying to write back the transcoded
video from a tmp directory into the PaperClip path
the original uploaded video file is stored into the :url => "/system/
2005 Jul 18
0
CESA-2005:470-04: Low CentOS 2 i386 fileutils bug fix update
The following errata for CentOS-2 have been built and uploaded to the
centos mirror:
RHBA-2005:470-04 fileutils bug fix update
Files available:
fileutils-4.1-10.9.i386.rpm
More details are available from the RedHat web site at
https://rhn.redhat.com/errata/rh21as-errata.html
The easy way to make sure you are up to date with all the latest patches
is to run:
# yum update
--
John Newbigin
2014 Jan 19
0
gem install fileutils error
Hello Guys
I'm new in Ruby
so I'm now trying to install fileutils by using the command [ gem
install fileutils ]
note: I'm using windows 7 :(
always when i trying to install it i got this error
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some
2016 Oct 28
0
Samba and BTRFS server-side copy
On Fri, Oct 28, 2016 at 02:02:57AM +0200, Saint Germain via samba wrote:
>
> On linux, most current utilities like Nautilus (gvfs) still use SMB1 to
> connect, so there is no chance to trigger a server-side copy.
Oh, just checked the current gvfs source code to copy an
smb file. It does:
static gboolean
copy_file (GVfsBackendSmb *backend,
GVfsJob *job,
const char
2007 Oct 01
2
[ win32utils-Bugs-14360 ] Bad interaction between win32-file-stat and FileUtils
Bugs item #14360, was opened at 2007-10-01 15:00
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=14360&group_id=85
Category: win32-file-stat
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: Bad interaction between win32-file-stat and FileUtils
Initial Comment:
Ruby
2006 Jan 27
0
FileUtils copy not working when invoked by webserver
I have image manipulation routines in one of my controllers, and in an
attempt to "undo" bad image edits, I want to copy the original image file
over the "working" image file.
FileUtils::Verbose.cp(@registrant.image(''original''), @registrant.image)
Works great when invoked with a valid @registrant object in script/console,
but it does not work when invoked on
2016 Oct 28
3
Samba and BTRFS server-side copy
On Thu, 27 Oct 2016 16:57:13 -0700, Jeremy Allison <jra at samba.org>
wrote :
> On Fri, Oct 28, 2016 at 01:42:35AM +0200, Saint Germain via samba
> wrote:
> > On Thu, 27 Oct 2016 16:27:05 -0700, Jeremy Allison <jra at samba.org>
> > > if you see any of these then it happened.
> >
> > Ok I understand how to check that it happened, but how can I make
2010 Aug 22
0
Paperclip - possible to modify file and load file content as string?
Wanted to see if anyone knows of a way - or the preferred way - to do these
three tasks with Paperclip:
1) Access the content of an uploaded file before save. I did find that the
following works before save, but is there a clearer way to do this:
self.uploaded_file.queued_for_write[:original].open.read
2) Access the content of a file after save while my AR model instance is
still alive and/or
2009 Aug 17
0
Paperclip: processor proc not firing
Hi
It''s extremely rare that I have to post something on the Rails list,
but this is one of those times that I''ve been completely stuck for
countless hours.
Environment: Rails 2.3.3
I''ve implemented a custom processor proc for video thumbnailing with
Paperclip (latest trunk version as git submodule, and yes, it''s
updated) using the instructions posted
2008 Oct 11
1
Asterisk 1.6.1 + openais
Hello,
I followed the steps by Russell*
http://www.venturevoip.com/news.php?rssid=1980*
and I got it working for publish_event only. As soon as I add
subscribe_event, Asterisk doesn't start and I just get the following
message:
*Oct 11 6:38:04.340485 [CLM ] nodeget: trying to find node ffffffff*
I have no idea what's wrong. There is not very much information about this
issue.
Where
2010 Nov 05
1
res_ais Error
Hi,
I'm trying distributed events with Openais but don't work.
I made the test with two asterisk box in the same LAN
box A: 192.168.142.246 asterisk 1.6.2.13
BoxB: 192.168.142.248 asterisk 1.8.0
openais.conf:
# Please read the openais.conf.5 manual page
totem {
version: 2
secauth: off
threads: 0
consensus: 4800
interface {
ringnumber: 0
bindnetaddr: 192.168.142.0
mcastaddr:
2010 Oct 01
20
Paperclip not executing FFMPEG properly
Im using a customs processor to run ffmpeg on a video to create a
thumbnail.
So far so good. Except when I do:
cmd = "-i #{@file.path} -f flv -s 320x240 ~/Downloads/foobar/q.flv"
success = Paperclip.run(''ffmpeg'', cmd)
Console is reporting:
ffmpeg ''-i /var/folders/uL/uL0bYOOZEZaJH5E+BmDJVE+++TI/-Tmp-/stream,
16824,1.mpeg -f flv -s 320x240
2005 Aug 10
1
fileutil & tar utility RPMs on RHAS3.0
Hi,
Please advice how to download utility for 'tar', 'cp' supporting RHAS3.0
RPMs listed in note 237997.1 are used for RHAS2.1
* Patch 2883583: fileutils-4.1-4.2.i386.rpm
* Patch 2913284: tar-1.13.25-9.i386.rpm
Best regards,
Huy.
==
Nguyen Quang Huy
Sr. Technical Sales Consultant
Oracle Vietnam
53 Quang Trung St, Hanoi
Email: quang.huy.nguyen@oracle.com
Phone: +84 4 943 2595
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here:
http://wiki.developers.facebook.com/index.php/Facebook_Styles
I included testing and comments. I hope you find it useful.
Curiously, it''s really a small extension of FBML.
Richard
-------------- next part --------------
Index: test/rails_integration_test.rb