Displaying 20 results from an estimated 20000 matches similar to: "Can''t run MySQL queries"
2006 May 25
16
yet another rails site - happycarpools.com
I''m pretty much done with a project I''ve been developing to learn Rails,
http://www.happycarpools.com . If you could take a look, that''d be awesome!
Feedback would be even more awesome!
Probably the coolest thing about making this has been seeing how Rails does
*so much* and hardly has any superfluous parts, if any. There are so many
features that I initially
2006 Apr 16
12
tired of using defined? all the time
Hi everyone,
It seems like every time I want to evaluate a possibly undefined variable I
have to use defined? to see that it exists first, so I can''t simply have
-- if params[:range_start] > 3
or something like it. I need to have
-- if defined? params[:range_start] && params[:range_start] > 3
I can''t even have
-- if params[:range_start].nil?
This is really
2006 May 18
4
time select with am/pm?
Hi everyone,
Is there a time select helper which uses a 12 hour clock rather than a 24
hour one? Also, does anyone know if :discard_year actually works in
datetime_select now, or how I could find this out?
Thanks!
Daniel
2006 May 23
6
OT: best books
Hopefully this isn''t completely inappropriate, but lately I''ve been curious
about what books people have found most helpful in their development as
programmers. If one of the icons like Dave Thomas, DHH, Mike Clark, Andy
Hunt et al could weigh in that''d be awesome :)
Here are some of my favorites:
Refactoring, Martin Fowler
Mastering Regular Expressions, Friedl
2006 May 26
4
shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}
I am saving an array of active record objects (college courses) in the
session as session[:course_list]. This is the cart for a registration
controller.
If a student chooses to delete the course from the list I get the :id
as params[:id].
However if I do
session[:course_list].delete_if {|x| x.id ==params[:id]}
does not work.
session[:course_list].delete_at(idx)
works. Ocourse to do this I have
2006 May 18
6
Form actions with additional parameters
Hiall,
I want to give the action of a form an additional parameters but can''t
figure out how to do it. My code looks like this
<%= start_form_tag :action => ''create'', next_step => true %>
<%= render :partial => ''user_form'' %>
<%= render :partial => ''community_form'' %>
<%= submit_tag
2006 Apr 13
2
acess local variables from helper?
if I call a helper method from inside a partial, it doesn''t appear to have
access to the partials local variables. is there a way to make them avilable
without passing them as parameters?
here''s a simple example
# in the view
<%= render :partial => "my_partial", :locals => :value => 2%>
# _my_partial.rhtml - raises "undefined local variable or
2006 Jun 12
2
dom id on form_remote_tag
I want to make use of a form_remote_tag to submit a form
asynchronously. Easy done. However, we also want to add an
observe_form tag to check for some value changes while the form is
being entered.
The observe_form tag needs a dom id to work on but I can''t see how to
enter an html option for the dom id of the form on the
form_remote_tag.
Any ideas?
Here is the form tag so far...
2006 Jun 07
3
Question on login generators, plugins
Not sure if I want to build my own or use something already built that''s out
there.
This is the first step in my project though and a major one, so some of my
requirements would be:
1-The ability for a user to register themselves
2-Email / link activation
3-Access levels (or ACL control - I think they are basically the same).
4-The ability to track users either through session or cookies
2006 Aug 03
5
Cannot find gem for Rails error from dispatch.cgi
Hi All,
I''m developing a Rails app with Rails v1.1.4, but when I upload it to
Dreamhost and try to serve it with dispatch.cgi, I get the error "Cannot find
gem for Rails =1.1.4". However, I have installed the 1.1.4 gem in my home
directory and set GEM_PATH to look there; additionally, rake throws no errors
and "rails -v" displays "Rails 1.1.4". Any
2006 Jun 28
2
Assign CSS class to Link to Remote
I''m trying to get link_to_remote to assign a CSS class to the link it
generates. My code is as follows:
<%=
link_to_remote "Show Full Info",
:update => "fullcontact" + reparray.last.to_s,
:url => "/cm/full_contact/" + reparray.last.to_s,
:classname => "contactlink"
%>
Which produces this HTML:
<a href="#"
2007 Jan 03
2
loading data and executing queries with R and Mysql
Hello everyone,
I have a problem when I execute queries using R 2.3.1 and MySql server 5.0.
What I do: I load data in different csv files (every file represents a
particular temporal step of a simulation) using Mysql query "load data" with
RMySQL command DbSendQuery (but the same problem there is also using
DbWritetable). Then I use a function where I have a lot of queries that
interact
2006 May 07
3
Webrick not showing sql queries any more?
Hi all,
I updated rails to 1.1.2, and somehow, when I run script/server on a new
rails project, I don''t see the sql queries in the console any more... It
was very useful to see them live...
Does any one have any idea why?
Thank you very much!
Nauhaie
--
Posted via http://www.ruby-forum.com/.
2006 Apr 14
6
LoginGeneratorACLSystem Issue
Hello all,
Again, thank you all in advance for any help here. I am trying to figure
out how to show the role associated with a user, in a template. I am
using the LoginGeneratorACLSystem along with the LoginGenerator. I can
show the first name of the user by writing "<%=
session[:user].first_name %>" but when I write "<%=
session[:user].roles.name %>" it spits
2004 Sep 21
5
R 1.9.1 Fails to Start on WinXP SP2
I have two computers both of which are running Windows XP SP2. R 1.9.1
runs just fine on one but not the other. Both installations of R came
from the same installation package. When I click on the desktop icon an
hourglass shows up then disappears. Similarly, if I start RGUI the
process shows up in task-manager then abruptly disappears.
Interestingly, I can access R in Excel via the D(COM) Server
2009 May 27
12
query on Ruby array
Looking for suggestions on following two queries.
Query 1
------------------------------
Are the two following lines of code different in Ruby / Rails ( in a
*.html.erb) file.
<% if @forms.count != 0 %> <!-- first code -->
Vs.
<% if @forms.count %> <!--second code -->
@forms is an array of objects. Coming from "C" language development
background, i thought
2006 Feb 24
6
MySQL client used in online presentation?
Hi, could someone tell me the name of the MySQL that''s being used with the
online presentation:
http://media.rubyonrails.org/video/rails_take2_with_sound.mov
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060224/bdf999b0/attachment-0001.html
2006 Mar 01
5
Error installing the MySQL Ruby bindings?
Hi, I attempted to install the MySQL Ruby bindings and I received the
following errors:
> gem install mysql -- --with-mysql-dir=/usr/local/mysql
Attempting local installation of ''mysql''
Local gem file not found: mysql*.gem
Attempting remote installation of ''mysql''
Building native extensions. This could take a while...
*** extconf.rb failed ***
Could not
2006 May 21
5
model methods
Hello everyone,
In my model, I have
def leave_at_formatted
leave_at.strftime("%I:%M %p")
end
I was wondering if there were any way to define to_s for leave_at in order
to get the same result?
Thanks!
2009 Jun 18
2
Fixing ogg vorbis corruption caused by bad metadata
On 6/18/09, Conrad Parker <conrad at metadecks.org> wrote:
> This sounds like it needs a new tool specifically for fixing broken
> Ogg files.
I see two solutions:
1) the new vcut which I reckon will fix the problem since it has to
split and rebuild the audio in a new Ogg
2) an Hex editor, even if just to check what's wrong in the metadata section
-Ivo