ruby-on-rails

flash webcam and rails

Hey guys, are there any good guides out there for doing rtmfp and rtmp flash with ruby? I'm really interested in webcam interactions and I'm looking for something all-inclusive that can take me up through the basics. I've been trying to work through some tutorials but with limited success. Any help would be greatly appreciated. Thanks ...

Ruby on Rails-UML Question

I am trying to use yUMLmeRails and Railroad on my Rails app to generate UML. cd myapp rake yUMLmeRails:download I get error as: Error loading model classes. Are you at your apps root dir? Rake aborted No such file to load I am at my app's root dir. It generates a .png file in the diagrams folder. But when I open it it say...

jruby rails 3 and warbler

I am trying to make a deployment war. I have the jdbc-mysql, activerecord-jdbcmysql-adapter and warbler gems installed. I have edited config/database.yml and changed the adapter to jdbcmysql... but I can not even run warble config without getting this error message: Could not find gem 'mysql2 (>= 0, runtime)' in any of the gem sources....

Problem pushing a master to heroku

I'm follow an online railstutorial Everything is ok but when trying to push the master directory to heroku. When it come to this: Installing rails3_serve_static_assets... done -----> Gemfile detected, running Bundler version 1.0.0 install everything but sqlite3, here it output: Installing sqlite3 (0.1.1) /usr/ruby1.8.7/lib/ruby/site_r...

Logging into Multiple sites

I have two different websites written in Rails(W1) and PHP(W2) both on different hosts. I used Authlogic for W1's authetication now I want to allow user of W1 to login into W2 using same username and password (as of W2). How can I do this? ...

"no such file to load -- fastercsv" error when trying to use fastercsv gem

I installed the fastercsv gem like this: sudo gem install fastercsv Then in my controller I put this: require 'fastercsv' When I try to use it though, I get this error: MissingSourceFile in Notes#export_data no such file to load -- fastercsv What have I done wrong? Thanks for reading. EDIT: I'm using Rails 2.3.5 rake gems (in ...

Drag/Drop with element_to_drag_id (scriptaculous), draggable element goes behind div element

I have a list of draggable elements built with element_to_drag. They sit inside a div. When dragging outside the div the draggable object vanishes under the side of the div. Much like this issue http://stackoverflow.com/questions/2098387/jquery-ui-draggable-elements-not-draggable-outside-of-scrolling-div is there an equivalent solution ...

How to organize time-based events for aggregation (such as visits) in a database?

I have a need to give my users time-based statistics about different kinds of visitors to their pages, such as how many visitors in the last week / last month / overall, and perhaps where those visitors are coming from. Ideally, the data would be rich enough to allow for expansion/customization/re-aggregation if possible. My question is...

Changes in scss files not reflect in css files

I want changes in my .scss files automatically reflect into css files. I'm using Rails 3. I places sass files to publish/stylesheets/sass folder I've added: require 'sass/plugin/rack' use Sass::Plugin::Rack to config.ru However changes in scss styles still not reflect into css files. ...

Variables in ruby and rails

I have started learning ruby and i have been looking at ruby on rails.Is there difference in variables and control structures in ruby and ruby on rails?. ...

How to cache HAML files in /tmp directory?

I'm having an issue with HAML where it is attempting to write to a read-only filesystem (on a Heroku-deployed app). I can only write to /tmp and /log. How can I configure HAML to write files to the /tmp directory? Thanks! Edit: Output of actual error Started GET "/" for <ip> at Sun Oct 03 13:19:42 -0700 2010 Processing by Welcom...

rails, pass arguments in when setting a new object

Hello, In rails, is it possible to pass arguments in when making a new object, and set some values accordingly? For example, if I have a screen with a list of items, and a link to make a new item at the top. If I were to put a drop-down list of "item types" beside the "new" link, how would I pass that value to the new function on the ...

DB table getting too much data - need another solution

I have a site where people can add their favorite TV series. There is one feature that makes it possible to check off episodes that you have seen. Each episodes that is checked off, creates one record in a DB table (with user_id, show_id and episode_id). This table is now over 600.000 rows and is growing very fast! I have indexes set u...

Adaptive Paypal

I am trying to use this gem for using the paypal adaptive payments and it calls for the development: environment: "sandbox" username: "sandbox_username" password: "sandbox_password" signature: "sandbox_signature" application_id: "sandbox_app_id" test: environment: "sandbox" username: "sandbox_username" password: "sandbox_password" sig...

Rails, MySQL, Unicode data and latin1 tables - Where to go from here?

I'm not 100% sure on the particulars, so I'd love someone straightening me out, but I'll forge ahead with what I think is going on... When I first setup my database, I used the default character encoding of the system without even thinking, and it was latin1. I never even thought about i18n/l10n. It just didn't occur to me. I just accep...

New to Ruby on Rails

Hi, I'm new to Ruby on Rails and was hoping people can assist with the following: 1) Tutorials for the complete newb to RoR? 2) How to get RoR up and running on Mac OS X (10.5.8) - where and how to install? 3) Can RoR work with an Oracle 10g backend and if so, how? Would really appreciate your help on the above. Thanks. ...

transfer db from one heroku app to another faster

Is there a faster way to transfer my production database to a test app? Currently I'm doing a heroku db:pull to my local machine then heroku db:push --app testapp but this is becoming time consuming. I have some seed data but it is not nearly as accurate as simply testing with my real-world data. And since they're both stored on a nei...

rails_xss, prefer raw or .html_escape?

Which is preferable? <%= raw @item.description %> or <%= @item.description.html_safe %> ...

how does RoR local give you such a nice API like: layout.side.title ?

How does the RoR localization engine take a .yaml file and produce such a nice API to access the localized text like: layout.side.title What kind of class is it that you can just create a recursive style of property accessors? ...

Regex to Match an URL with a HASH

Hello, I'm using the Rails 3 nav plugin simple-navigation: http://github.com/andi/simple-navigation In the configuration file you can setup a regex to determine what element gets the ".selected" class. Example: primary.item :projects, 'Projects', project_path, :class => "sideNav-main", :highlights_on => /\/projects/ The above work...