Re: [Rails] Exporting a Postgres database to CSV without superuser privileges

2013-04-05 Thread Scott Ribe
On Apr 5, 2013, at 3:40 PM, Jason Hsu, Android developer wrote: > I need superuser access in order to run this code. No you don't. You need select privileges on the table, and write permissions in the output directory. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread haxuan lac
I tried create 1 pseudo by Faker but it's very slow. I fake 1000 record about 20 minutes. And 1 record take me 2-3 hours. please give me some advice about this time I had done with fake pseudo data(1000 and 1 pseudo). Thanks.. -- Posted via http://www.ruby-forum.com/. --

Re: [Rails] How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Jordon Bedwell
On Fri, Apr 5, 2013 at 6:37 PM, Julian Leviston wrote: > Props, Greg! I'm impressed with your response. I saw the question, and > these kinds of questions really bother me because they lack specificity. I > was thinking maybe we should have a noob web form app that could help them > build their qu

Re: [Rails] How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Julian Leviston
On 06/04/2013, at 2:13 AM, Greg Akins wrote: > Depends on what you're trying to test. > > If it's a single table and the values in the database don't matter, you can > just add a [0..1].each loop in seed.rb > > Or copy production data > > Or use a sql script to load your database > > O

[Rails] Exporting a Postgres database to CSV without superuser privileges

2013-04-05 Thread Jason Hsu, Android developer
How do you export a Postgres database to CSV when you do NOT have superuser privileges? The line of code in question (for my Bargain Stock Funds project at https://github.com/jhsu802701/bsf-scrape/blob/master/scrape.rb) is: @conn.exec("COPY funds TO '" + csv_path + "' With CSV HEADER;")

Re: [Rails] Re: What is Javascript-Runtime for?

2013-04-05 Thread Colin Law
On 5 April 2013 19:01, Peter wrote: > Thanks for replying, Frederick. So help me understand this: > javascript-runtime is actually the javascript interpreter. Right? But what > is odd is when I install node-js this solves my problem. And I thought > node-js was written in javascript. Therefore, it

[Rails] Re: What is Javascript-Runtime for?

2013-04-05 Thread Peter
Thanks for replying, Frederick. So help me understand this: javascript-runtime is actually the javascript interpreter. Right? But what is odd is when I install node-js this solves my problem. And I thought node-js *was* written in javascript. Therefore, it itself requires an interpreter. Did I

[Rails] How to manage data in MongoDB

2013-04-05 Thread haxuan lac
I'm working with MongoDB but i feel impatient with it. I want tool manage MongoDB same as PHPmyadmin(Mysql),Sqlite manager... I found some tool for this but I don't know what I shall use please give me some advice for this!Thanks... -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: Heroku alternatives

2013-04-05 Thread Khash S.
I can also suggest Cloud 66 (www.cloud66.com) which is an application management as a service. It configures, deploys and manages your web applications and mobile backends on any cloud or your own servers without the need to for any download or sysop. Disclaimer: I work for Cloud 66 -- Posted

Re: [Rails] rendering instance value to partial views from controller

2013-04-05 Thread Thota praneeth
yeah i have changed to local variables and passed to partial by debugging in firefox i got the expected values in javascript(partial view) but graph is not displaying according to expected values On Fri, Apr 5, 2013 at 9:27 PM, Gintautas Šimkus wrote: > First of all I suggest you to try firebug

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Sean L.
haxuan lac wrote in post #1104574: > I want to test performance of project. > So i want make 1 record of table for testing. > I don't know how to ganerate record. > Who can help me? Thanks. Look at rails cast #179. this has a tutorial on using seed.rub to create test data. http://railscasts.c

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread haxuan lac
Thank Gintautas,Greg Akins very much I will do with instruction of you. Thank you vey much again!!! -- 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 receiv

Re: [Rails] reques for an project tutorial for beginners

2013-04-05 Thread Colin Law
On 5 April 2013 17:04, cihad yildiz wrote: > Can someone prepare project tutorial for beginners > for example a website with a database > explaning steps railstutorial.org is free to use online. For me it is the first hit when googling for rails tutorial Colin -- You received this message bec

Re: [Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Greg Akins
huxuan Faker might be overkill.. or might not. Try both approaches and let us know which works best. If you have ActiveRecord model defined (say User.rb) Then just include this in the db/seed.rb [0..100].each do |i| User.create(:name => "name#{i}", etc...) end A problem with this approach

Re: [Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Gintautas Šimkus
Though just simple db:seed and then exporting development DB and importing it into test DB should do the trick. 2013/4/5 Gintautas Šimkus > Maybe, I don't know :) you just got to investigate stuff, that's part of > learning something new process :) > > > 2013/4/5 haxuan lac > >> Yes ,Thanks Gi

Re: [Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Gintautas Šimkus
Maybe, I don't know :) you just got to investigate stuff, that's part of learning something new process :) 2013/4/5 haxuan lac > Yes ,Thanks Gintautas > If I want create 100(1 million) pseudo data,i can this way for it? > And i hear a gem with called "faker" http://faker.rubyforge.org/ > ca

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread haxuan lac
Yes ,Thanks Gintautas If I want create 100(1 million) pseudo data,i can this way for it? And i hear a gem with called "faker" http://faker.rubyforge.org/ can i using this gem for solve my problem ( create 100 pseudo data)? Thanks very much -- Posted via http://www.ruby-forum.com/. -- Yo

Re: [Rails] reques for an project tutorial for beginners

2013-04-05 Thread Gintautas Šimkus
new rails project uses sqlite as DBMS and it requires no setup whatsoever. You just create your models, migrations and go from there. Any book on rails explains that. 2013/4/5 cihad yildiz > Can someone prepare project tutorial for beginners > for example a website with a database > explaning s

[Rails] reques for an project tutorial for beginners

2013-04-05 Thread cihad yildiz
Can someone prepare project tutorial for beginners for example a website with a database explaning steps -- 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 r

Re: [Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Gintautas Šimkus
As far as cloning development DB into test DB, check out http://stackoverflow.com/questions/2645022/rails-populate-test-database-with-development-data 2013/4/5 Gintautas Šimkus > You can add data via Rails models, like > > User.create({ > Just use rails code inside seed.rb to generate whatev

Re: [Rails] rendering instance value to partial views from controller

2013-04-05 Thread Gintautas Šimkus
First of all I suggest you to try firebug in firefox. Then you can see exactly what is returned for your request. In your case you might need escaping javascript with javascript_escape. 2013/4/5 srikanta mahapatro > We have two options. The first option is the suggested solution. > >1. > >

Re: [Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Gintautas Šimkus
You can add data via Rails models, like User.create({ > Thanks Greg Akins > I'm using MongoDB and in Mongodb has some table as: > user,comment,photo,relationship > And tables have ralationship(user relationship with photos..) > Could you give me some advice for this problem?Thanks > > -- >

[Rails] 90-minute Ruby 2.0 Webinar?

2013-04-05 Thread Kelsey Lundstrom
I work for a technology company (PBTech.) and am looking to run a 90-minute overview webinar on the new release of Ruby 2.0 ... Anyone have thoughts on whether there would be interest in this topic / potential instructors to teach it / what it should cover ... etc. Any and all help is appreciate

Re: [Rails] rendering instance value to partial views from controller

2013-04-05 Thread srikanta mahapatro
We have two options. The first option is the suggested solution. 1. Change all instance variables to a local variable and pass it to the partial with the locals argument of render. 2. Set the instance variable before the partial is rendered. Partials have access to all the inst

Re: [Rails] Start to using Bootstrap with RoR

2013-04-05 Thread srikanta mahapatro
We have a simple example in railscast for twitter bootstrap with ROR http://railscasts.com/episodes/328-twitter-bootstrap-basics?view=asciicast follow the path of the above URL On Thu, Apr 4, 2013 at 6:17 PM, Greg Akins wrote: > http://railsapps.github.com/twitter-bootstrap-rails.html > > Gre

[Rails] Re: How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread haxuan lac
Thanks Greg Akins I'm using MongoDB and in Mongodb has some table as: user,comment,photo,relationship And tables have ralationship(user relationship with photos..) Could you give me some advice for this problem?Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread Greg Akins
Depends on what you're trying to test. If it's a single table and the values in the database don't matter, you can just add a [0..1].each loop in seed.rb Or copy production data Or use a sql script to load your database Or one of these http://watirmelon.com/2012/06/15/three-ways-to-generate

[Rails] How to create 10000 pseudo data for Testing in RoR

2013-04-05 Thread haxuan lac
I want to test performance of project. So i want make 1 record of table for testing. I don't know how to ganerate record. Who can help me? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" gr

[Rails] Problem with command rails new

2013-04-05 Thread Israel T.
Hi, I'm new to Ruby and when I try lo run ' rails new project' for example, I get the following error message: I searched every where with no luck. Thanks for any help /Users/Zani/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.13/lib/rails/generators/base.rb:19: no such file to load -- thor/a

Re: [Rails] Re: Test for checking update attributes

2013-04-05 Thread Jordon Bedwell
On Fri, Apr 5, 2013 at 9:45 AM, Jordon Bedwell wrote: > On Fri, Apr 5, 2013 at 9:38 AM, Dmitrij B. wrote: > >> Turn it into an integration test and use Capybara to fill in the form as >> if you are actually on the page and the user. > > I said integration, I meant feature. -- You received this

Re: [Rails] Re: Test for checking update attributes

2013-04-05 Thread Jordon Bedwell
On Fri, Apr 5, 2013 at 9:38 AM, Dmitrij B. wrote: > test work without errors. I easy ask, its correct code for this test? > > test "update_shipping_date" do > order_before = orders(:one) > > get "/orders/1/edit" > assert_response :success > assert_template "edit" > >

[Rails] Re: Test for checking update attributes

2013-04-05 Thread Dmitrij B.
test work without errors. I easy ask, its correct code for this test? test "update_shipping_date" do order_before = orders(:one) get "/orders/1/edit" assert_response :success assert_template "edit" post_via_redirect "/orders", order:

Re: [Rails] Re: Test for checking update attributes

2013-04-05 Thread Colin Law
On 5 April 2013 15:06, Dmitrij B. wrote: > thanks))) And what you can say about my test. I wrote corectly his? Please read my previous reply again. Especially the last paragraph. I have not looked at the test. Is it not working? When asking questions here it is better to try and ask a specifi

[Rails] Re: Test for checking update attributes

2013-04-05 Thread Dmitrij B.
thanks))) And what you can say about my test. I wrote corectly his? -- 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, send an emai

Re: [Rails] Re: Test for checking update attributes

2013-04-05 Thread Colin Law
On 5 April 2013 14:43, Dmitrij B. wrote: Please quote the previous message so that it is easier to follow the thread. Remember this is a mailing list not a forum (though you may be accessing it via a forum like interface). Thanks. > its text error: Error: > test_update_shipping_date(UserStorie

[Rails] Re: Test for checking update attributes

2013-04-05 Thread Dmitrij B.
its text error: Error: test_update_shipping_date(UserStoriesTest): ActionView::Template::Error: undefined method `>' for nil:NilClass /home/dima/RubyOnRails/Projects/depot/app/views/layouts/application.html.erb:23:in `_/lib/action_view/renderer/renderer.rb:17:in `render' -- Posted via http

Re: [Rails] Test for checking update attributes

2013-04-05 Thread Colin Law
On 5 April 2013 14:22, Dmitrij B. wrote: > Did a little test, which verifies that the upgrade ship_date field data > matches during the upgrade. Test code below. Can not quite figure out > how and what to pass to get method. The test does not work,error in file > code. - Does it not tell you whic

[Rails] Test for checking update attributes

2013-04-05 Thread Dmitrij B.
Did a little test, which verifies that the upgrade ship_date field data matches during the upgrade. Test code below. Can not quite figure out how and what to pass to get method. The test does not work,error in file code. - https://gist.github.com/dborovsky/5319125 -- Posted via http://www.ruby-f

Re: [Rails] Help with single page application structure

2013-04-05 Thread RonPhillips
This tut shows a combined approach: http://blog.berylliumwork.com/2012/09/tutorials-on-angularjs-and-rails-2.html?view=classic (Don't forget to download angular-resource and require it in application.js. Other than that, everything worked.) I'm fiddling with it right now, because I don't reall

Re: [Rails] Help with single page application structure

2013-04-05 Thread Johan Vauhkonen
Do you disable Rails routing somehow when using client-side routing? On Thursday, 4 April 2013 14:31:09 UTC+2, tamouse wrote: Absolutely, you can go so far as to have your SPA initial download be a > static index.HTML in ../public, and just have your routes speak JSON to the > Angular requests.