Hi,
Could someone suggest me to how to write console output into Text file Ruby?
I want to deal with the console output of the Ruby script. Please tell me
how to do that?
Please help. Thanks in advance.
--
Thanks and Regards,
Amit
--
You received this message because you are subscribed to the
Hello,
I am providing a facility where a user can tweet a content along with the
url from my site(And it's working fine.), but Once after tweeting from my
site no response I am getting from twitter.
My Question is how do my system will know whether user has posted on twitter
or not?
It will be
f = File.open('text.txt', 'w')
old_out = $stdout
$stdout = f
puts 'hello'
puts 'world'
f.close
$stdout = old_out
puts 'goodbye'
--output:--
$ ruby ruby.rb
goodbye
$ cat text.txt
hello
world
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
Thanks for your prompt reply. This is really helpful. But if I want to write
the following output to the text file then how should I achieve this?
*Output:*
Loaded suite simple
Started
.
Finished in 0.203125 seconds.
1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0
First crack at an app. I have a friend with a private school that I'm
trying to create a scheduling system for.
So I have Coordinators creating school courses. Once the course is
created the coordinator can assign multiple instructors, and then
assign students to the course and instructor. So is
No one can answer that question. Your question is akin to asking: was
multiplication or division used to get the number 6.
--
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,
Ok. Thanks for your reply. Still I will be trying to get the solution. :)
Thanks,
-Amit
On Sat, Aug 6, 2011 at 1:49 PM, 7stud -- li...@ruby-forum.com wrote:
No one can answer that question. Your question is akin to asking: was
multiplication or division used to get the number 6.
--
Posted
On Aug 6, 12:59 am, jjb123 jimmyblanch...@gmail.com wrote:
Hey everyone,
I'm having an incredibly difficult time getting bundle to work
properly on my production server.
Dumb question: is git installed (and is it a sufficiently recent
version that it can work with https urls) ?
Fred
My
The point is: what did you do to get that output??? OKAY??!
--
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@googlegroups.com.
To unsubscribe
so when attempting to destroy a record i get this in the server log
output:
AREL (0.4ms) DELETE FROM items WHERE items.id = 39
Started GET /items/20 for 127.0.0.1 at 2011-08-06 10:59:27 +0200
AbstractController::ActionNotFound (The action 'show' could not be
found for ItemsController):
but a
Hi comrades,
I'm using devise sign_in and sign_up urls are workin
but, when I try the url: http://localhost:3000/users/sign_out
it generates routing error
No route matches [GET] /users/sign_out
How can I fix this?
Thank you,
Sayuj Othayoth
--
You received this message because you are
You may want to consider using a :through association. The coordinator may be
better defined as a role type. Within a course people have a role: coordinator
or student. The relationship between people and the course is through the role.
Keeping the role object will indexing on the participants
On Aug 6, 9:07 am, MC amev...@gmail.com wrote:
First crack at an app. I have a friend with a private school that I'm
trying to create a scheduling system for.
So I have Coordinators creating school courses. Once the course is
created the coordinator can assign multiple instructors, and then
On Sat, Aug 6, 2011 at 2:21 AM, depassion kevin.b...@gmail.com wrote:
so when attempting to destroy a record i get this in the server log
output:
AREL (0.4ms) DELETE FROM items WHERE items.id = 39
Started GET /items/20 for 127.0.0.1 at 2011-08-06 10:59:27 +0200
I think having the flexibility of having a student and or instructor assignable
to different courses may come in handy. We may want to have records of past
course participants. That's why a through association on a role may work out
best.
On Aug 6, 2011, at 2:42 AM, Frederick Cheung wrote:
Hi sir,
I have create one rails application ,am creating user form and
using the session (logged on) and (logged out) , i dont know how its
used am newipe in rails pls help
regards,
john
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed
On Sat, Aug 6, 2011 at 2:52 AM, john paul li...@ruby-forum.com wrote:
Hi sir,
I have create one rails application ,am creating user form and
using the session (logged on) and (logged out) , i dont know how its
used am newipe in rails pls help
regards,
john
John, I would recommend
Hi,
My models:
#StatusMessage model
*class StatusMessage ActiveRecord::Base
belongs_to :users
default_scope :order = created_at DESC
end*
#User Model
*class User ActiveRecord::Base
has_many :statue_messages
end
*In controller I want to join these two tables.
When I use :
*@status =
Hello all,
I developed an app using Rails 3.1 and uploaded it to heroku. When I
typed rake db:migrate , I got the following error:
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs
for a list of available runtimes.
Does heroku support Rails 3.1? They seem to have no
You must ask twitter for this. Have you gone through their API?
On Aug 6, 12:41 pm, Abhishek shukla bettera...@gmail.com wrote:
Hello,
I am providing a facility where a user can tweet a content along with the
url from my site(And it's working fine.), but Once after tweeting from my
site no
Thanks..
On Sat, Aug 6, 2011 at 3:45 PM, Conrad Taylor conra...@gmail.com wrote:
On Sat, Aug 6, 2011 at 2:52 AM, john paul li...@ruby-forum.com wrote:
Hi sir,
I have create one rails application ,am creating user form and
using the session (logged on) and (logged out) , i dont know
On Aug 6, 11:25 am, Karthikeyan mindas...@gmail.com wrote:
Hello all,
I developed an app using Rails 3.1 and uploaded it to heroku. When I
typed rake db:migrate , I got the following error:
Could not find a JavaScript runtime. Seehttps://github.com/sstephenson/execjs
for a list of
On Aug 6, 11:21 am, Sayuj Othayoth sayujothay...@gmail.com wrote:
Hi,
My models:
#StatusMessage model
*class StatusMessage ActiveRecord::Base
belongs_to :users
default_scope :order = created_at DESC
end*
#User Model
*class User ActiveRecord::Base
has_many :statue_messages
On Aug 3, 7:08 pm, Barney bsper...@gmail.com wrote:
I've installed the gem meta_where (and it reported back:
Succeeded) but when I use the example in a search method of a
controller:
Person.where(:some_field.matches = '%something%')
there is an error that it doesn't know the method
On Aug 4, 7:32 pm, Aashish Kiran li...@ruby-forum.com wrote:
? p.preview.url
= /system/previews/3/original/FTpreview.zip?1312375624
? file=p.preview.url
= /system/previews/3/original/FTpreview.zip?1312375624
url returns the url at which the file is available when accessed via
the web
I am still confused by rails 3 new rules, and knowing so little about
it,I want some help on a particular problem: inflection when creating
models:
what can I do in order to get rails generate model using words ending
in 'a', so that the plural generated add an 's'
If I edit
We are looking for a rails developer to join our startup. Some
experience with SASS and MySQL is prefered but not a requirement. Our
startup is working on a revolutionary platform for health and fitness
and a passion for getting healthier and fit definitely helps. If you
are looking to join a
On Aug 6, 12:16 pm, gatopardo gato.pa...@gmail.com wrote:
I am still confused by rails 3 new rules, and knowing so little about
it,I want some help on a particular problem: inflection when creating
models:
what can I do in order to get rails generate model using words ending
in 'a', so
Sayuj,
Are you using JQuery? In that case, you can try rails g
jquery:install. I had the same problem a few days ago. It's an issue
related to DELETE actions.
On 6 ago, 06:28, Sayuj Othayoth sayujothay...@gmail.com wrote:
Hi comrades,
I'm using devise sign_in and sign_up urls are workin
I'm in Melbourne, Victoria, Australia.
Whereabouts are you?
On Aug 6, 9:52 pm, gojinj...@gmail.com gojinj...@gmail.com wrote:
We are looking for a rails developer to join our startup. Some
experience with SASS and MySQL is prefered but not a requirement. Our
startup is working on a
:) It doesn't actually say that. I figured it was easier to change the text
to represent an easier concept than the actual app.
I did discover that i need to pass the arguments in this way though. Rather
than specifying :action_id= id as a parameter, I needed to add it to the
link.
Eg
On Aug 5, 3:33 pm, Dave d...@coledesignstudios.com wrote:
Hello all,
I'm new to ruby on rails, been dealign with LAMP my entire carrier and
have decided to take the dive and learn ruby. To start this off I
decided I wanted to install ruby on my Window 7 PC at home with WAMP
and learn from
I have struggled a lot to run my first rails app on windows
None of the tutorials explain in as simple as this one
http://www.javapassion.com/handsonlabs/rails_basics/
could run hello world
but the rest are not free
how to get them
?
--
You received this message because you are subscribed to
Thanks a lot Federick
On Aug 6, 3:57 pm, Frederick Cheung frederick.che...@gmail.com
wrote:
On Aug 6, 11:25 am, Karthikeyan mindas...@gmail.com wrote:
Hello all,
I developed an app using Rails 3.1 and uploaded it to heroku. When I
typed rake db:migrate , I got the following error:
Hi all
I am working on the first application from the book Head First Rails
called tickets. What I do not understand is where the variable
new_ticket_path gets populated in the view index.html.erb
%= link_to 'New Ticket', new_ticket_path %
Please advise
--
Posted via
On Aug 6, 2011, at 12:46 PM, Pepe Sanchez wrote:
Hi all
I am working on the first application from the book Head First
Rails
called tickets. What I do not understand is where the variable
new_ticket_path gets populated in the view index.html.erb
%= link_to 'New Ticket', new_ticket_path %
Walter,
So if I understand correctly new_ticket_path, edit_ticket_path, ticket
are like constants that RoR assigns to them specific values.
If I want to create a new link on my RoR Application to a new page
called for example myblog, and add it to the index page, which will be
the right
On Aug 6, 2011, at 1:22 PM, Pepe Sanchez wrote:
Walter,
So if I understand correctly new_ticket_path, edit_ticket_path, ticket
are like constants that RoR assigns to them specific values.
If I want to create a new link on my RoR Application to a new page
called for example myblog, and add it
I'm passing hash (called 'params') to a method. Some keys (one of them
is called 'starts_at') in that hash have date as a value (taken from
datetime_select helper). I want to access the date elements like date
only or time only but I'm just out of ideas.
def self.new_meeting(params)
str =
Are there tutorials that walk you through making a photo album using
RoR?
Thanks.
--
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
Try:
has_many :StatueMessages instead of:
* has_many :statue_messages*
On Sat, Aug 6, 2011 at 1:58 PM, Frederick Cheung frederick.che...@gmail.com
wrote:
On Aug 6, 11:21 am, Sayuj Othayoth sayujothay...@gmail.com wrote:
Hi,
My models:
#StatusMessage model
*class StatusMessage
Thank you
I misspelled *has_many :status_messages*
thank you very much
On Sat, Aug 6, 2011 at 2:40 PM, tudor cornea tudor.cor...@gmail.com wrote:
Try:
has_many :StatueMessages instead of:
* has_many :statue_messages*
On Sat, Aug 6, 2011 at 1:58 PM, Frederick Cheung
On Aug 6, 7:20 pm, Jarek Plonski li...@ruby-forum.com wrote:
I'm passing hash (called 'params') to a method. Some keys (one of them
is called 'starts_at') in that hash have date as a value (taken from
datetime_select helper). I want to access the date elements like date
only or time only but
On 6 August 2011 13:48, Frederick Cheung frederick.che...@gmail.com wrote:
On Aug 6, 12:16 pm, gatopardo gato.pa...@gmail.com wrote:
I am still confused by rails 3 new rules, and knowing so little about
it,I want some help on a particular problem: inflection when creating
models:
what can
On 6 August 2011 15:59, Rahul Rai raikra...@gmail.com wrote:
I have struggled a lot to run my first rails app on windows
If you have any choice at all then don't use windows for rails apps.
Life will be much simpler if you can move to a Linux system such as
Ubuntu. The learning curve time will
Time/date objects have methods like year, month, day etc. which return
the individual components
Well I know that but, can you, please, tell how to use those methods in
my example?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the
On 6 August 2011 20:50, Jarek Plonski li...@ruby-forum.com wrote:
Time/date objects have methods like year, month, day etc. which return
the individual components
Well I know that but, can you, please, tell how to use those methods in
my example?
I don't know the format of you params string
starts_at = Time.parse( params[:starts_at] )
puts starts_at.year
Colin, this is exactly what I needed. Thank you! :)
--
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
Jarek Plonski wrote in post #1015315:
starts_at = Time.parse( params[:starts_at] )
puts starts_at.year
Colin, this is exactly what I needed. Thank you! :)
Well, you lied. You didn't have a Date, you had a String.
--
Posted via http://www.ruby-forum.com/.
--
You received this message
If you have tried all the above and it still didn't work, try the
instructions on THIS page:
http://lightyearsoftware.com/2011/02/mysql-5-5-on-mac-os-x/comment-page-1/#comment-33204
It worked for me! (Don't forget to use the source command or restart
your terminal session after modifying your
1. THE STORY MISSION OF OUR COMPANY
At Lookbook, we love fashion, shopping and trends. We believe that
life should be lived fully and that all of us should strive to look
our best, without spending too much time doing so. We are creating a
platform to simplify your dressing-up process without
Hey everybody,
I'm new on RoR and I was wondering with sb could help me.
I have one page that interacts with a lot of controllers and actions,
so I need to create many forms(one per action).
Example: In this page I send message to user, make one vote in one
post, remove one post. So I create one
Well, you lied. You didn't have a Date, you had a String.
I'm not saying that I know what I'm talking about :)
I'm newbie but I didn't lie.
What I said was:
...date as a value (taken from
datetime_select helper)
if it was a String then datetime_select returns a string, or Dates are
Strings
I too am trying to do this. It seems like something that should be
easily configurable. establish_connection :blah
seems to work fine in the model,
however causes problems in the migration used to create that model
ActiveRecord::Base.establish_connection :blah
The migration completes
Frederick,
I would want to be able to see what students are being taught be what
instructor. And yes I would want to be able to know what the course
the student is taking. So from my current setup are you saying I
wouldn't get that? Or would I get that if I used a :through
association?
I'm sort
Mark,
Here are some question I would raise in designing a domain model for an app
like this:
- Can students and or instructors participate and or coordinate more than one
course simultaneously?
- Do you want to retain record of past participation?
The reason why I pointed out the role
Yep, it's installed (I've used it on the server before). I'm not sure
but I think this has something to do with RVM changing all of the
application paths but I don't really know how to diagnose this.
On Aug 6, 4:33 am, Frederick Cheung frederick.che...@gmail.com
wrote:
On Aug 6, 12:59 am, jjb123
What is the correct way to configure jQuery UI with Rails 3.1
application?
Bharat
--
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
Hey guys,
As most of you know, Rails 3.1 introduces query caching for
ActiveRecord. Great change all-in-all, but for those of us with IT
department mandates for using MySQL (yeah, yeah, I know...), it's kind
of a mixed bag.
I need to disable query caching in a project I'm building based on
3.1.
59 matches
Mail list logo