Displaying 20 results from an estimated 50000 matches similar to: "which d should I choose?"
2012 Apr 12
6
beginning_of_month problem
Rails 2.3.2, Ruby 1.9.3
I want to get all records for one month from charges table.
recs = Charge.where(["date >= ? and date < ?", t.beginning_of_month,
t.next_month.beginning_of_month])
and this transforms into this query on PostgreSQL
SELECT "charges".* FROM "charges" WHERE (date >= ''2012-03-31
22:00:00.000000'' and date <
2010 Dec 11
3
Why doesn't Heroku show the Rails default page?
Following chapter (1) of the Ruby on Rails tutorial:
http://railstutorial.org/, I was able to successfuly push the
application to "Heroku" using:
> git push heroku master
But, when I open the website, I get a page with the following:
App crashed
This application is temporarily offline.
If you''re the administrator of this app, please check your heroku logs
for the backtrace.
2012 Jun 21
6
where do I report this DateTime bug?
I have isolated what appears to be a bug in the Rails extensions to
DateTime, but I don''t know where to report it.
I have a standalone file to demonstrate the bug, but the punch line is
that this code:
TestRecord.create!(:f_datetime => (expected = DateTime.jd(2000000)))
found = TestRecord.first.f_datetime
puts("expected == found => #{expected == found}")
2010 May 12
10
Rails and PostgreSQL ???
Hi every one
How are you?
after a days and searching in forums i still can not find some things
that helping me
to connect Rails with postgre SQL of course those are helpful but not
for a stupid person like
me :D
So i need my friends helping me here and advice me to how can i connect
this two things (ROR and Postgre Sql)
I need your help so much
My eyes going blind because of searching and
2012 Aug 25
6
Ruby Cgi and Mysql/Postgresql
Hi
i m very new in ruby ( i used to work on php)
I am looking for good documentation or book which will show me
how to use ruby with CGI + mysql /Postgresql
something like, will show how to grab data from database and pass those
into Select or combox box ..
i tryed to look for books but i have not find any
so good documentation site, books would be good
Thnaks
--
Posted via
2012 Sep 18
13
pg gem error
gem install pg give the following error, please help how can i solve this
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/home/saravanan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for
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
2013 May 31
11
A simple javascript alert not working
If I have a file in view /test called index.js.erb and in it a simple
alert("hello") shouldn''t that run when I go to /test/index? It doesn''t.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it,
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string
2012 Feb 01
10
Very strange problem: Ton's of ruby process just running simple command "rails --version" or "rails
Very strange problem: Ton''s of ruby process just running simple command
"rails --version" or "rails new test1""
I have very strange problem. I try to run this simple command
"rails new test1" --> this suppose to be create a new rails site.
"rails --version" --> even this I got ton''s of ruby process
but I got a lot of ruby
2010 Mar 05
15
Three submits, one controller
I have a ''new'' page with a submit for creating stories. On the ''show''
page the submit allows a user to enter comments. I now want a ''edit''
page for the stories with another submit for updates. I have used the
''create'' and ''update'' methods in the stories_controller on the ''new'' and
2010 Jun 29
16
problem finding find current page
I have this bit of code in my email.controller
user = @current_user
story = @current_story
recipient = story.user
It doesn''t work because @current_story isn''t defined. How can I find the
current page to make this work?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2010 Dec 05
14
Remove bundler
Can you remove bundler without any problem – for rails?
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up
with the following error.
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id
app/controllers/posts_controller.rb:11:in `create''
posts_controller_test.rb:5:in `test_should_create''
Here is my test file
require
2010 Aug 19
6
Depreciation warning when running a db migrate!
Hey,
Whenever i try and run a db migrate i get this error:
DEPRECATION WARNING: Rake tasks in vendor/plugins/livevalidation/tasks
and vendor/plugins/restful-authentication/tasks are deprecated. Use
lib/tasks instead. (called from
/Users/Zack/.gem/ruby/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10)
I tried moving the different plugins task rake files to lib/tasks and i
got no error but the database
2012 Mar 05
8
Create a select with HABM
Hello, I have two tables with association HABM, projects and users, and
in projects I want to show all users that was associated to the project.
I have try with this:
<%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } )
%>
But only show all my projects, but Iz don''t know who show only the user
in a determinated project.
class Project <
2011 May 22
11
Problems Connecting to SQL Server
Hi all
I want to connect my app to MSSQL but when i type
rake db:migrate
an erro occured like this:
←[31mCould not find gem ''odbc (>= 0, runtime)'' in any of the gem sources
listed in your Gemfile.←[0m
this is my YML file:
development:
adapter: sqlserver
mode: odbc
dsn: ontrack
host: BABAK-PC
pool: 5
timeout: 5000
and in my gem file
gem
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
2013 May 07
4
Rake db:migrate
Hello,
I''m trying to use command rake db:migrate, but in MySQL I continuous get
an empty set and I do know why.
#/db/seeds.rb
User.create(username: "lorenz", password: "mypass", admin: true)
When I run:
rake db:seed RAILS_ENV=development --trace
I received:
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
**
2010 Nov 11
5
ActiveRecord query
I have these sql code in postgresql
"SELECT * from convenios where id NOT IN
(SELECT convenio_id from solicituds where usuario_id=?"
but don''t find a way of used it in rails
except
find_by_sql.
There is a another way??
class Usuario < ActiveRecord::Base
belongs_to :persona
has_many :solicituds, :dependent => :destroy
has_many :convenios, :through =>