Displaying 20 results from an estimated 4000 matches similar to: "Connect with MySql and Ruby"
2012 Feb 02
3
problem in mysql and ruby data fetching
Hi,
Just yesterday I successfully installed ruby in my pc, means I am
new in this technology.
Today I am trying to fetch the data in my ruby application and
successfully done this. Now I want to speed up the performance of the
fetching data by making use of prepare and execute method.In case of
select query also I am using this like
require ''mysql''
mysql =
2011 Mar 08
6
Windows /RailsInstaller- Webrick starts but welcome page doesn't load
I''m trying the RailsInstaller to get ROR installed on Windows.. everything
was going great(rake db:create/migrate and console working as expected)
until I started the server, webrick starts but the welcome page never loads,
no errors are displayed at all it just sits there forever, I looked at the
logs and there are no errors there either
Here is my configuration
Windows 7
Rails 3.0.4
2012 Feb 03
2
PDF and Ruby on Rails
Hi,
I am sticking in one problem. Please help me out. The problem is
like:
What problems can arise when users hits the get_pdf action?
If there are problems, how can it be solved?
class PdfController < ApplicationController
def get_pdf
send_data Pdf.create(params[:contents])
end
end
class Pdf
def self.create(contents)
make_pdf(contents) # takes 30 seconds to run
end
2012 Apr 10
6
User Association
Please Im trying to create an application where i can post like twitter,
but i was the users name to be posted under their respective posts
My Post_controller looks like this
def index
@posts = Post.all(:order => "created_at DESC")
@users = User.find(:all)
#@user_id = current_user.find(params[:id])
respond_to do |format|
format.html
end
end
def create
2011 Nov 26
3
Asset pipeline giving me hard time. Please help !!! - (rails 3.1.3)
I am using rails 3.1.3.
Inside config/ application -> config.assets.enabled = true
Inside development.rb -> config.assets.compress = false
Inside production.rb -> config.serve_static_assets = false;
config.assets.compile = false
I have images placed in assets/images. If i do localhost:3000/assets/
image I get the image in the browser, but
unfortunately, on the browser i am
2013 Mar 14
7
No Migration Files are created
I''ve been working with Rails for 3 Months now, but haven''t experienced
this problem until now. I''m currently working through Micharl Hartls
Tutorial and everything worked fine so far, but suddenly (chapter 11) I
can nolonger create Migration Files.
when entering "rails g model Name field1:type" I don''t get the usual
"create db/migrate...."
2011 Nov 05
13
Adding a site admin user while creating a site
Hi Gurus,
I wanted to add siteadmin user(basically a user with a certain role) while
creating the site itself. I hope that i have done all the necessary stuff
by going through raynb''s railscasts (
http://railscasts.com/episodes/196-nested-model-form-part-1) But could not
see user fields being displayed in the site creation form.. Below are the
details.
I Have two model users and
2011 Oct 26
6
Add an index to a form
Hello,
I''m having some trouble with forms, my app allows to enter data by
using a multi-step form that has 7 steps.
There are 3 steps that may let the user to add 1 form, for example
there''s a step called "children"
and that children has the following fields:
* name
* age
* gender
but one father may have more than 1 child and I''m adding another form
with
2012 Feb 28
8
getting error:undefined method 'current'
hi all,
i am getting an error ''undefined method ''current'' for 852:Fixnum'', the
error coming for following line
<%if @expert_pagination.current.previous%>
<a href="#" class="darkgray1"
2011 Sep 18
9
Rails 3 and postgresql
I have a simple project created around a very, very simple database: one
main table packs with just three rows
Column | Type |
Modifiers
--------+-----------------------------+----------------------------------------------------
id | integer | not null default
nextval(''packs_id_seq''::regclass)
nombre | character
2012 Jan 24
4
:locals does not pass var in rails 3.1.0 partial view
Here is code in form.html.erb for partial view. Local var :sid was
defined as the id of the record and it should be passed into the
partial view standards.html.erb as a local var.
<% @rfq.standards.each do |r| %>
<p><%= render :partial => ''standards'', :locals => { :f =>
f, :sid => r.id } %></p>
<% end %>
Here is the
2012 Jan 03
1
updating rails version to 3.1.3 get error
hi all,
i have ruby : 1.8.7 rails :2.3.11 and rubygem:1.6.2 installed on my
Windows sys. my application work without error .I have upgraded the
environment
to gem:1.8.12,rails:3.1.3 ,ruby:1.9.2
i have getting the following error on starting the Webrick server
D:/Hemant/Suggestica_setup/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'': cannot load such
2012 Jan 17
4
Find all association methods
Hi all,
I want to get all association methods in one single model....
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
Please reply me ....
Thanks,
kingston.s
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2011 Nov 12
3
complex form with dynamic fields.
I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1,
part2 and part3.
It seems to be my case.
I have:
Company
has_many :documents
has_many :tenders, :through..........
and
Document
belongs_to :company
Tender
has_many :companies, :through..........
I want to insert documents and tenerds on company creation.
If documents are more than one the user can click "add
2012 Aug 28
16
rail s exiting
Hello everyone,
I am fairly new to ruby on rails, and I come across this tutorial on
treehouse where they help you make a simple version of facebook.
anyway, I was writing codes, and I came across this error and I am not
sure how to fix it. The error occurs after I type in rail s on the
command prompt and as soon as try to look at how it looks on
127.0.0.1:3000, it gives me this error. the
2012 Jan 27
3
How to test the model dependence ?
Good morning,
I''m new to rails and am having some basic questions in development. See
if anyone can help me with a test problem. I need to test if my model
"Procedure" is linked to the workflow. If not, the system must
acknowledge an error. Below is the code that is in the file test \ unit
\ procedure_test.rb.
require ''test_helper''
class ProcedureTest <
2012 Aug 22
1
Getting Started problems - How can I get a report of errors
Hello all,
I started trying to learn Ruby on Rails from a course on Lynda.com. Unfortunately, I got stuck early on after installing things. First, I got an error trying to install a first application called simple_cms. I read a bit about the error (after doing a web search) and found directions telling me to get DevKit and run about 3 commands. The config file only had one line in it
2012 Aug 17
5
How to Include Gem in Different Path
Hi,
I just tried Ruby on Rails (with RailsInstaller 2.1.0) and it works fine
on my PC. However, when I put this on the website, I got the following
error message:
Could not find multi_json-1.3.6 in any of the sources
(Bundler::GemNotFound)
The problem is that the website has multi_json 1.0.4. The website
allows me to download my own gems, but after the process, it is located
at
2012 Feb 08
3
An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
error information occurred when I execute "rails new demo1 --
database=mysql"
MY environment below:
Mac OS 10.4.11,
Ruby 1.8.7
Rails 3.2.1,
Gem 1.8.15
mysql5 Ver 14.14 Distrib 5.1.61, for apple-darwin8.11.1 (i386) using
readline 6.2
mysql (2.8.1)
Please help me, thx!
more detail message as follows:
Installing mysql2 (0.3.11) with native extensions
2011 Dec 07
1
Errors when running the local server
Hi all,
I''m running an application on my localhost, but the command "rails server"
behaves very inconsistently. About an hour ago it ran well on another app,
but got errors now.
According to the errors it seemed that the server began to run but the
there is something missing in the library. But I''m very new to Rails so
cannot figure out what do these lines mean: