Displaying 20 results from an estimated 100 matches similar to: "Newbie error message!"
2006 Jul 25
1
newbie--how do i load a parsed file?
Hello there,
I''m new with ruby on rails and i don''t know how to load up a parsed file
into my database. I have my ruby script that parses it but don''t know
where to put my code, or how to combine it with view/model/controller.
this is what i have:
class Description < ActiveRecord::Base
def import_strings(a_file)
table = { }
2006 Jul 27
7
Newbie question---
I wrote a ruby script that parses a file into key-values like so:
class Parser
table = { }
IO.foreach(''Localizable.strings'') { |line|
if line =~ /^ \s* " (.*?) " \s* = \s* " (.*?) "/x
table[ $1 ] = $2
end
}
end
I want to store the key-values in different colums on my database so
that when I enter a key, it gives me the corresponding value...how
2006 Jul 28
0
newbie----what''s wrong with my code
I know i''m new with ruby and i''ve been kind of confused with how rails
manages all the details. I want to store the key-values in different
columns on my database so that when I enter a eky, it gies me the
corresponding value. this is what i have:
my view:
<h1>Importing Strings<h1>
<%=error_messages_for("string_record")%>
<%=
2006 Jul 31
10
nothing uploads.....why? (newbie question)
Hi everybody,
I know this is an easy question but I don''t seem to see the solution.
I''m trying to have a user select a file so that my code can parse it and
populate the database with corresponding values. So far it seems like
uploads but nothing shows in my db. Can anybody give me a hand?
thanks
view:
h1>Importing Strings<h1>
2006 Apr 27
1
SOAP service - perl server, ruby consumer incompatability
Hi All,
Wonder if any of you guys can help troubleshoot the following for me.
What I''m trying to achieve is:
1) Perl web service, using SOAP::Lite (server)
2) Ruby web service consumer, using SOAP::RPC::DRIVER (client)
My problem is, if my client and server are both Perl based, the
output is as expected. However, if the client is Ruby based (haven''t
tried another
2011 Jun 17
7
Encoding
What''s a good solution for fixing character encoding problems for
compatibility between ascii and utf-8? The database is postgres and
is encoded in utf-8.
Once in awhile there will be a compatibility error from strings from a
webform.
Is there a command to fix this besides using
a_string.force_encoding(''utf-8'')? Even this doesn''t seem to always
work either.
2007 Feb 14
2
Solaris 10 and "store dos attributes"
I'm having trouble with files being marked read-only in Windows because the
Solaris file owner does not have write-permissions on the file; group-write is
allowed:
-r--rw---- 1 user group 32 Feb 13 14:19 testfile.txt
I thought that setting "store dos attributes = yes" for this share would allow
the "read only" setting to be stored in extended attributes, but it
2007 Feb 28
4
acts_as_authenticated error with Object#id
I''m getting this when I run my Rails controller specs.
<projectroot>/config/../lib/authenticated_system.rb:16: warning: Object#id
will be deprecated; use Object#object_id
I added "include AuthenticatedTestHelper" to /spec/spec_helper.rb so
that my controller tests^H^H^H^H^Hspecs can use the "login_as" helper
method. Anyone know how to fix this?
--
Cheers,
2006 Nov 16
7
Negating or removing classes
I have a situation where I''d like to perform some actions when a node is
removed from a class. I have a few (homegrown) services that install ssh
keys in authorized_keys and it''s possible that a node may have the
service enabled and disabled during it''s lifetime. When disabled I''d
like to clean up the ssh keys for security reasons.
This brings up the broader
2006 Apr 17
2
Simple Problem
Is it possible to select a portion of string? For example, in many
websites, they give the first paragraph in the main page and link for
the article on the other page. I remember this is available in PHP.
Any help is appreciated.
Thanks
Rizwan
--
Posted via http://www.ruby-forum.com/.
2005 May 04
2
exop vs md5
WHat is the significance to Samba of pam_password exop vs pam_password md5 in ldap.conf?
The reason I ask is that, wherever possible, I prefer to use the vendor supplied tools for
manipulating config files. With Fedora 3 it's system-config-authentication and it doesn't
give you the option of exop. You either enable MD5, which puts pam_password md5 in ldap.conf,
or disable it, which puts
2006 Aug 02
4
is it possible to duplicate a key? --new
Im not very familiar with RoR so this question might be kind of silly.
I want to store strings from different lenguages in a database. I want
to have the key for the string in english be the ''key'' for all the
corresponding traslations of that string. For example:
(database columns)
lenguage-------------key-----------------value-----
english hello
2010 Aug 13
2
samba-3.5.4 + OpenLDAP
Hi folks,
I having a problem compiling Samba (Last Stable Version) from source on
a Debian fresh install.
Escenario:
OS: Debian Lenny 5 64 bits
Kernel: 2.6.26-2-amd64
Samba Version: 3.5.4
OpenLDAP Version: slapd_2.4.11-1
I tried this before and after the OpenLDAP installation and always have
the same error:
./configure --with-ldap --with-ldapsam
.
.
.
.
.
checking for LDAP support...
2011 May 28
2
remove ", " at the end of each line for all lines except the first line in a data frame
the question ask me to use gsub() and subsetting to remove the comma at the
end of the for all but the first value in a data frame.
the first few lines are like the following:
[1] "2177663,-41,175,2678248,6021224,1840,5,25,17,,,6,,"
"2177691,-39.6,176.2,2784798,6173592,1843,7,8,5,30,,7.6,12,"
[3]
2000 Nov 21
1
Exist the S 'dates' function in R?
Good afternoon,
I am a new user of the R application, and I don't know to much about the
lenguage.
I am trying a to run some of the S programs I have, and some of them are
crashing with the "dates" function. This function translate a character
string into a 'dates representation object'.
Do you know if there is a similar function in R?
Thank you very much for your help
2006 Jul 21
1
Newbie Question about Ruby on rails---cant upload data
Hi everybody,
Ruby on Rails is my first programming lenguage...it looks to me like i''m
missing the big picture. I''m trying to upload a file into a database.
In my app. my user needs to select a file and upload it...however I only
want him to upload certain information from that file. I have written
code to parse only string tables from that file. For example, the table
2013 Mar 14
4
exec resource not refreshed when subscribed resource changes
Hello,
I''ve created a little class which should unpack a 7z archive on Windows.
The class has a parameter for passing in the archive version, so that I can
trigger an update when a new version of the archive is available. A
simplyfied version looks like this (requires 7z):
class my_archive ($version = undef) {
file { ''version'':
path =>
2012 Aug 28
17
Tilde en RStudio
Estimados miembros de la lista,
Cómo hago para trabajar con tildes en RStudio.
En concreto, cuando cargo un archivo .txt o .csv en RStudio, no me reconoce
el tilde com tal y me coloca otros caracteres en su lugar.
¿Existe alguna solución?
Saludos,
Manuel
--
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
2012 Sep 20
4
Duda sobre internacionalización (i18n)
Hola a todos,
Tengo un programa que muestra unos informes generados con R (utilizando la
función cat()), y me gustaría que dichos informes le aparecieran al usuario
en el idioma que tenga definido según su LOCALE. ¿Cómo se podría hacer esto
con R?
En otros lenguajes lo que se hace es definir un diccionario con todas las
palabras que aparecen en los informes, y su traducción en los distintos
2000 Oct 27
6
GIS and R
Dear All,
Does anyone know of any GIS packages for R? I know that there are
GIS facilities for S-Plus (eg Arc Info), and am looking for freeware
equivalents.
Best wishes,
Sam Brown
-----------------------------------------------------------
Sam Brown sam at zoo.cam.ac.uk
Department of Zoology tel +44 1223 330933
Downing Street fax +44 1223 334466