ruby-on-rails

Implementation of "Remember me" in a Rails application.

My Rails-app has a sign in box with a "remember me" checkbox. Users who check that box should remain logged in even after closing their browser. I'm keeping track of whether users are logged in by storing their id in the user's session. But sessions are implemented in Rails as session cookies, which are not persistent. I can make them ...

Frequent SystemExit in Ruby when making HTTP calls

I have a Ruby on Rails Website that makes HTTP calls to an external Web Service. About once a day I get a SystemExit (stacktrace below) error email where a call to the service has failed. If I then try the exact same query on my site moments later it works fine. It's been happening since the site went live and I've had no luck tracking...

How do I fix 'Unprocessed view path found' error with ExceptionNotifier plugin in rails 2.1?

After upgrading a rails 1.2 website to 2.1, the ExceptionNotifier plugin no longer works, complaining about this error: ActionView::TemplateFinder::InvalidViewPath: Unprocessed view path found: "/path/to/appname/vendor/plugins/exception_notification/lib/../views". Set your view paths with #append_view_path, #prepend_view_path, or #vie...

What is good forum software to add to an existing Rails application?

Should be easy to setup, and easy to couple application and forum users. ...

Ruby On Rails with Windows Vista - Best Setup?

What do you think is the best set-up for RoR in a Win Vista environment? I've tried the radrails eclipse plug-in, and it just seemed too bulky for me, I've also started to just use Textpad and the command line, but I'm used to having somewhat of an IDE to work with. Thanks for the help!...

How do I create a new Ruby on Rails application using MySQL instead of SQLite?

I want to create my Rails application with MySQL, because I like it so much. How can I do that in the latest version of Rails?...

How to sell Python to a client/boss/person with lots of cash

When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it?...

Learning Ruby on Rails any good for Grails?

My company is in the process of starting down the Grails path. The reason for that is that the current developers are heavy on Java but felt the need for a MVC-style language for some future web development projects. Personally, I'm coming from the design/usability world, but as I take more "front-end" responsibilities I'm starting to fe...

Haml: how do I set a dymanic class value?

I have the following html.erb code that I'm looking to move to Haml: <span class="<%= item.dashboardstatus.cssclass %>" ><%= item.dashboardstatus.status %></span> What it does is associate the CSS class of the currently assigned status to the span. How is this done in Haml? I'm sure I'm missing something really simple. Edit: Gah....

Why all the Active Record hate?

As I learn more and more about OOP, and start to implement various design patterns, I keep coming back to cases where people are hating on Active Record. Often, people say that it doesn't scale well (citing Twitter as their prime example) -- but nobody actually explains why it doesn't scale well; and / or how to achieve the pros of AR w...

Ruby mixins and calling super methods

Ok, so I've been refactoring my code in my little Rails app in an effort to remove duplication, and in general make my life easier (as I like an easy life). Part of this refactoring, has been to move code that's common to two of my models to a module that I can include where I need it. So far, so good. Looks like it's going to work out...

Why does sqlite3-ruby-1.2.2 not work on OS X?

I am running OS X 10.5, Ruby 1.8.6, Rails 2.1, and sqlite3-ruby 1.2.2 and I get the following error when trying to rake db:migrate on an app that works find connected to MySQL. rake aborted! no such file to load -- sqlite3/database ...

Why Doesn't My Cron Job Work Properly?

I have a cron job on an Ubuntu Hardy VPS that only half works and I can't work out why. The job is a Ruby script that uses mysqldump to back up a MySQL database used by a Rails application, which is then gzipped and uploaded to a remote server using SFTP. The gzip file is created and copied successfully but it's always zero bytes. Yet i...

OpenID authentication in Ruby on Rails

I am a neophyte with Ruby on Rails but I've created a couple of small apps. Anyway, I'm really interested in OpenID and I would like to implement OpenID authentication and maybe some Sreg stuff in a Rails app. All of the research that I have done has come up with articles that are out of date or just don't work for me. Since I'm so new t...

Is Ruby On Rails ready for the Enterprise?

Is anyone out there using RoR for large scale, business critical enterprise applications? Are there any other lightweight web-frameworks based on dynamic languages that people are using for these types of apps? If you're not using these types of application frameworks what's stopping you? Is it simply the inertia associated with any l...

What IDE to use for developing in Ruby on Rails on windows?

I've generally been doing stuff on Microsoft .Net out of college almost 2 years ago. I just started looking at Ruby on rails. So what editor should I use? I'm using Notepad++ right now but can I get debugging etc. somehow? ...

How Do You Secure database.yml?

Within Ruby on Rails applications database.yml is a plain text file that stores database credentials. When I deploy my Rails applications I have an after deploy callback in my Capistrano recipe that creates a symbolic link within the application's /config directory to the database.yml file. The file itself is stored in a separate direc...

Being as DRY as possible in a Ruby on Rails App

I'm currently using the awesome attachment-fu plugin for a Rails app, but as a novice developer, I've never encountered a scenario like the one I've found myself in. Essentially, I'm using the attachment-fu plugin on two levels. The first is for user avatars in the user class. The second is to allow file attachments (PDFs, etc) in a mess...

Any tips on getting Rails to run with an Access back-end?

I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord? Later: I appreciate all the suggestions to use other databases, but trust me: I've tried convincing them. There is an "approved" list, and no SQL databases are on it. Getting some...

Associating source and search keywords with account creation

As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain than Google Analytics would. I assume I could set some kind of cookie with this information when p...