[Rails] RSpec vs. Cucumber

2013-08-22 Thread Jason Hsu, Android developer
So far, I've been using RSpec for testing my Rails apps simply because that's what railstutorial.org emphasizes. However, I am in the process of trying out Cucumber. I like the fact that it's in plain English, and this is an asset for communicating with clients or other people who aren't

[Rails] How do I change the jQuery version of a page?

2013-08-13 Thread Jason Hsu, Android developer
I have two Rails sites (Bargain Stock Funds and Doppler Value Investing) that use the Ransack gem. In the Bargain Stock Funds search page ( http://www.bargainstockfunds.com/funds), the remove and add conditions buttons do not work in the production environment but do work in the development

[Rails] Re: How do I change the jQuery version of a page?

2013-08-13 Thread Jason Hsu, Android developer
It turned out that jQuery version 1.9.1 was being mandated by files in the public/assets directory in Bargain Stock Funds. The Doppler Value Investing file had no public/assets directory. So I removed the public/assets directory from Bargain Stock Funds, and the buttons work as expected. --

[Rails] How do I allow users to search a database table?

2013-07-09 Thread Jason Hsu, Android developer
I recently launched the new Rails-based version of Doppler Value Investing (http://www.dopplervalueinvesting.com). It profiles over 4000 individual stocks in terms of free cash flow and net liquid assets. As you can see at http://dopplervalueinvesting.com/stocksview, I know how to extract

[Rails] Bootstrap: How do I change the black bar at the top?

2013-06-08 Thread Jason Hsu, Android developer
Chapter 5 of railstutorial.org (http://ruby.railstutorial.org/chapters/filling-in-the-layout#top) talks about how to create a basic layout for a web site. I use it as a great resource for putting a Rails web site together. I'm having difficulty customizing the navbar/header. While changing

[Rails] My first working Rails site - Bargain Stock Funds

2013-05-14 Thread Jason Hsu, Android developer
Thank you for your help and encouragement. I am pleased to report that my first Ruby on Rails site is now operational. Bargain Stock Funds ( http://www.bargainstockfunds.com) now displays profiles of over 10,000 stock ETFs and mutual funds from the value investing point of view. There are

[Rails] Why did you switch from Django to Rails?

2013-05-11 Thread Jason Hsu, Android developer
I'd like to hear from those of you who have switched from Django to Rails. I understand the appeal of Django (more straightforward to newbies and less chance of breakages during upgrades), but what makes you like Rails better than Django? I learned Drupal before learning Rails. A Drupal

[Rails] Getting Rails to work with an existing database instead of a new one

2013-04-24 Thread Jason Hsu, Android developer
All of the Rails tutorials I've looked at seem to revolve around creating a new database and then making the contents of the database accessible through the web page. The URL http://localhost:3000/users gives you access to the user list after you enter the following commands: rails generate

[Rails] Examples of long AND WELL-WRITTEN Ruby scripts

2013-04-23 Thread Jason Hsu, Android developer
I'm looking for examples of Ruby scripts that are long AND well-written. I have a Ruby script for scraping information on stock ETFs and mutual funds and storing the data in a Postgres database at https://github.com/jhsu802701/bsf-scrape/blob/master/scrape.rb . While I need to make some minor

[Rails] Re: Examples of long AND WELL-WRITTEN Ruby scripts

2013-04-23 Thread Jason Hsu, Android developer
Walter, I've looked at the Ruby source code of a few games, and I'm starting to see what you're talking about. I see that more experienced Ruby developers don't cram everything into one file like I did. I see that I should be giving each class its own file, and I should be using Modules. I

[Rails] OT: looking for a domain name registrar (ICANN-accredited, not a reseller)

2013-04-19 Thread Jason Hsu, Android developer
One of my domain names had a renewal problem this week that shut down the web site and email. (Fortunately, this has since been resolved.) Regardless of whether the reseller or the vendor was at fault, I intend to switch from this registrar to a different one when my domains are up for

[Rails] How do I work with an EXISTING database?

2013-04-19 Thread Jason Hsu, Android developer
I have a standalone Ruby script that downloads web pages, scrapes data from these downloaded pages, and stores the results in a Postgres database. This script is to run nightly. (My project is called Bargain Stock Funds. This database stores data on mutual funds and ETFs.) I am working on a

[Rails] Do you run rspec tests in production?

2013-04-08 Thread Jason Hsu, Android developer
I understand that rspec testing is necessary in the development process to catch errors, bugs, and other issues early. Given that differences between development and production cannot be 100% eliminated, do you run rspec testing in production as well? Is there any good reason NOT to use rspec

[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;) I

[Rails] Confusion over Postgres usernames/passwords/databasenames

2013-04-04 Thread Jason Hsu, Android developer
I have a Ruby script (https://github.com/jhsu802701/bsf-scrape/blob/master/scrape.rb) that scrapes web pages and stores the results in a Postgres database. I'm trying to set this up not only in the development environment but in a production environment as well, and the production environment

[Rails] Re: heruko performance vs shared hosting performance

2013-04-04 Thread Jason Hsu, Android developer
Heroku is prohibitively expensive, and GoDaddy is the Wal-Mart of web hosts. Why not use WebFaction? It's much better than GoDaddy and much cheaper than Heroku. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this

[Rails] Storing Postgres data in a variable

2013-03-31 Thread Jason Hsu, Android developer
I'm learning how to work with Postgres databases. I've figured out how to get the script at http://marcclifton.wordpress.com/2012/11/12/an-example-of-using-postgresql-with-ruby/ to run properly. I learned from this script how to enter data into a database table (addUser function) and how to

[Rails] Re: Help with Ruby on Rails

2013-03-31 Thread Jason Hsu, Android developer
I have also added pages on Ruby on Rails to my web site at http://www.jasonhsu.com/ror . I'm not that much more experienced than you are, so I have to take good notes on the proper procedures. My Ruby on Rails pages cover the material that most other Ruby on Rails web sites gloss over, such

[Rails] Do you ALWAYS use bundle exec rspec spec tests?

2013-03-15 Thread Jason Hsu, Android developer
I'm going through Michael Hartl's Rails tutorial, and I am happy to report that (as of the end of section 7) I'm able to get things working. (That said, I skipped the section on automated testing, as Hartl warned that automated testing is the most likely part of his book to become outdated.)

[Rails] Best IDEs for Ruby on Rails

2013-03-15 Thread Jason Hsu, Android developer
What are your favorite IDEs for Ruby on Rails? Are there any good IDEs that IMMEDIATELY flag problems the way Eclipse does in Android development? Given the importance of testing, I'd like to use a tool that immediately and automatically flags problems. -- You received this message because

[Rails] Prerequisites for learning Ruby on Rails

2013-02-22 Thread Jason Hsu, Android developer
I'm currently learning Ruby. (You can see what I'm doing at https://github.com/jhsu802701/bargainstockfunds-scrape .) I already have experience with HTML, Drupal, and object-oriented programming in Python. What else should I learn before boning up on Rails? Should I learn JavaScript as

[Rails] Calling a function: one space difference between failing and succeeding

2013-02-20 Thread Jason Hsu, Android developer
I have a function defined as follows: def download_file (url1, url2, file1, file_age_max_hours) puts (url1) puts (url2) puts (file1) puts (file_age_max_hours) end The following command works: download_file(Hello, World, Rubyists, 34) The following command fails: download_file

[Rails] How do you download a file from the web and save it locally?

2013-02-19 Thread Jason Hsu, Android developer
I'm trying to learn Ruby. A task I'm trying to do is download a file from the web and save it locally. I'm looking at http://ruby.bastardsbook.com/chapters/io/ and trying to implement the solution in the Exercise: Copy Wikipedia's front page to a file using block notation section, but it's

[Rails] Suggestions for my first serious Ruby on Rails project

2013-02-16 Thread Jason Hsu, Android developer
My first serious Ruby on Rails project will automatically display information on the ETFs and mutual funds with the lowest price/book and price/cash flow ratios and also provide other essential information for value investors like the expense ratio, the annual portfolio turnover rate, and the

Re: [Rails] Suggestions for my first serious Ruby on Rails project

2013-02-16 Thread Jason Hsu, Android developer
On Saturday, February 16, 2013 8:52:54 PM UTC-6, Norm wrote: My inclination would be to have a seperate task (cron job maybe) that scraped the data and put it into the database. I would then have the rails web site just calculate any needed factors from the data in the database and sort

[Rails] The rails generate command

2013-02-13 Thread Jason Hsu, Android developer
I understand the rails generate command generates the files needed for a general type of app. The types of apps include scaffold, model, controller, and others. What are all the options, and what do they all mean? -- You received this message because you are subscribed to the Google Groups

[Rails] What can you do in Ruby on Rails?

2013-02-06 Thread Jason Hsu, Android developer
I tried to learn Ruby on Rails once before (in Rails 3.0, just as 3.1 was first released) but gave up because I couldn't gain any traction. A local Meetup group dedicated to Ruby on Rails beginners has just popped up, and I'm considering giving Ruby on Rails one more chance. One of my biggest