similar to: HELP!!! New to Ruby

Displaying 20 results from an estimated 3000 matches similar to: "HELP!!! New to Ruby"

2006 Aug 08
1
Bad file descriptor - connect(2)
Hi All, I am a newbie in Ruby-Rails. Actually we are using postgre SQL and Ruby application to access the DB. I have made the controller and the model classes. My database.yml contains: development: adapter: postgresql database: test username: poc password: poc host: localhost:5000 test: adapter: postgresql database: test username: poc password: poc host: localhost:5000
2006 Jul 31
3
PostgreSQL, postgres gem, rails2.pdf, http://ruby.scripting.ca/postgres/ confusion...
Hello people... In the rails2.pdf Dave T says: Rails works with the DB2, MySQL, Oracle, Postgres,... The database drivers are all written in C and are primarily distributed in source form. Then he lists this site: http://ruby.scripting.ca/postgres/ Then he says, There is a pure-Ruby version of the Postgres adapter available. Download postgres-pr from the Ruby-DBI page at
2012 Jun 27
6
Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type ruby::gemInstall at myFile.pp:82
I have a module located at /etc/puppet/environments/test/modules/ruby. I n this I have a manifests folder with two .pp files - init.pp and gemInstall.pp. In one of my node def files I have: include ruby ruby::gemInstall { ''someGem-version.gem'': path => ''/path/to/agent/local/gem/repo'', } ruby::gemInstall is a define, and it has some logic to get around
2006 Apr 04
4
Freezing Architecture-Dependent Gems such as Rmagick, Ferret, Unicode
A lot has been made recently about the need to freeze your gems for production deployment on a shared server so your application can depend on it''s own gem version instead of being subjected to whatever gem is installed on the server, but does this rule of thumb come with an exception? Architecture dependent gems such as RMagick, Ferret and Unicode have dependencies that cannot be
2006 Apr 03
4
Multiple file uploads - only one file object gets posted
All, Trying to upload multiple files. Form: <% index = 0 for @image in images do %> <TR> <TD> <%= @image.path.split(''/'').last[0..39] %>: <% if ((! @image.path.nil?) && (@image.path.length > 40)) %> <%= h("...") %> <% end %> </TD> <TD> <%=
2006 May 29
3
File.size() on Uploaded Images Fail
I am checking the file size of an uploaded file and storing it in a filesize column. It will work just fine when the user uploads any files other than images (jpg,png,gif). Word, Excel, Powerpoint, .zip and more all work fine. This is my model asset.rb that handles the file upload. def newfile=(newfile_field) self.filename = base_part_of(newfile_field.original_filename) self.filetype
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of
2006 Aug 17
3
file_column do download from URL
Is there a simple way of forcing file_column to download file from given (ex. in form) url instead of uploading it manualy? I know: http://blog.caboo.se/articles/2006/01/09/file_column-magick-and-versions require ''open-uri'' Attachment.find_first.filename = open(url) if not working as expected... what is interesting is that: >> @a =
2006 Feb 01
1
Class of uploated file
Hi, i have small problem when you upload file by input type=file to rails then in rails it is represented by one of following StringIO, File, Tempfile Is it all? Or can it be represented by also other class? I need to know this because i have my own validation of file kind and when is mime type invalid then i want to put msg to record.errors and i also want to dont upload this file in next
2006 Jan 02
5
How can one use GRUFF with locomotive ( I guess there is a wider question here, also)
Hi: I love Locomotive and use it exclusively for my rails projects. I''d like to install GRUFF and give it a try (a graph image creation package). I know I can do sudo gem install gruff from the command line for normal ruby and rails. How do I make gems available to Locomotive? bruce
2007 Apr 27
3
Image upload problem.
I''ve seen posts of a few people who have this problem, but not a single response about solving it. I can''t upload .png files, but .jpg and .gif work fine. When I upload just a .png, my action gets a StringIO object which breaks when I try to copy the upload to an absolute location. However, using multiple-field upload, as long as one of the to-upload files is *not* a .png, all
2007 Mar 06
2
SVG and tooltips, hyperlinks
Dear all, is there a good way to create SVG plots with R whose elements have titles (tooltips) or act as hyperlinks? I am using the RSvgDevice package, which works great - but it doesn't seem to support the notion that plot objects have titles or are act as hyperlinks, so I am helping myself by giving the objects funny unique colors and then postprocessing the .svg file. I wonder
2008 Dec 05
2
xtable html links
Hi, I was trying to get hyperlinks using xtable, but couldn't get the hyperlinks to function properly. For example, if I use ## Try to link NY times website to every figure in column 4 mat <- matrix(1:43,6,5) mat[,5] <- "http://nytimes.com" for(i in 1:nrow(mat)){ strr <- paste('<a href="', mat[i,5],'">', mat[i,4], '</a>',
2013 Mar 15
2
Icalendar.Parse(StringIO.new(aString)) complains about missing method, bytesize
I need to send an ics file to a web service, so however it gets there it will arrive as a string. Is there another way to begin Icalendar''s Parse than with a file? I''m currently sending the file using the curl command... curl -v --data-urlencode ics at invite.ics http://127.0.0.1:4567/ics2event I''ve tried curl''s --data-binary and sinatra''s
2006 Jun 12
8
Input/output error on linux
Hi, I''m trying to use mongrel 0.3.13 with Rail 1.0 Believe it or not, on OS/X it works well for weeks at a time. On linux I''m getting Input/output errors after anything from a few hours to days, never more than a week. Once they start they don''t stop. The only pattern I''ve seen is that it always (seems) to happen while rendering an rhtml file.
2006 Jun 07
5
File is nil
I don''t understand why my program does not get the file that I try to upload. It returns the following error when I try to upload a small file: NoMethodError in LogfileController#create You have a nil object when you didn''t expect it! The error occured while evaluating nil.original_filename #{RAILS_ROOT}/app/models/logfile.rb:9:in `file=''
2006 Nov 24
0
HELP!!! How to track memory usage in WEBrick
Hi all, I am developing an application which uses up a lot of memory because om multiple threads executing in one time. I am using BackrounDRB for the purpose. Is there any way or tools available so that i can track the memory usage in the server. Any help would be greatful. Thanks in advance. - Janeve -- Posted via http://www.ruby-forum.com/.
2006 May 04
3
File Upload problem when file is small, under 19k(read method returns nothing)
Hi I hope someone can shed some light on this have searched a lot but found nothing definite. This happens on Ubuntu and Fedora 2. I am having a problem with uploading small files (images gif or jpeg under 19k). According to ruby documentation these are stored temporarily as StringIO objects rather than temporary files (as is done with the larger file uploads). The problem is that when it
2010 Jan 24
2
Rails server error when rails starts
Hi guys, i am having a little problem. I have installed ruby 1.9.1 and rails 2.3.5. Ruby is working just fine. The rails applications is being created fine. But when i run the command ruby script/server i get an error that says "The program can''t start because msvcrt-ruby18.dll is missing". I googled this message and is pointed to this page:
2006 Nov 05
1
Testing custom mongrel handlers?
Hey Folks- I''m trying to setup a new test/spec harness for testing Merb. I was wondering if there is a way to mock the Mongrel request, response objects easily to test my handler without actually running a server? I can easily do the env hash but I''m not entirely sure what needs to go in the request StringIO object that gets passed into my mongrel handler''s