I'm running 1.9.2 with rails 3.
I'm using rvm.
I did:
sudo gem install ruby-gem
and got:
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/Users/blankman/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** extconf.rb...
For those of you who have implemented Leaner CSS for existing apps, I'm assuming that you didn't take your existing 1000 lines of CSS and migrate to Leaner CSS day 1. So how did you use the two in parallel? How did you setup your env to run off the old CSS file while also using any CSS written in LESS? Any good tutorials out there?
...
Hi all
I have a model containing products. I would like to create a search form to allow users to apply compound filters to products as required. For example:
Products with a price of between '10' (text field) and '50' (text field) with a colour of 'Red', 'Green' or 'Blue' (check box fields) and a weight of 'Less than' (select field) ...
For a rails CSS framework for an existing app, which one do you prefer - LESS or COMPASS?
...
What, if any, issues can you expect to encounter if you replace plugin with a gem version? For ex, paperclip plugin to paperclip gem.
...
The script block begins with $('#map#{shop.id}')..... in content_for :in_script doesn't work.
def edit_country_fields_template(city, shop)
content_tag(:div, :class => "item") do
"<div id='map#{shop.id}' class='map'></div>".html_safe +
if shop.geocoded?
content_for :in_script do
$('#map#{shop.id}').gMap({ mar...
What impact, if any, does having A LOT of gems have on the performance of your Rails app?
...
I have a few related questions. I am new to Rails 3 after taking a year-long break from Rails in general.
I am using Devise for authentication and I have a controller and model called 'User'.
So, I can use 'localhost:3000/users/sign_out' to log the user out. I want to put a link at the top right that says 'logout' so when they click on...
A contact has_many notes; notes belong_to a contact. In my notes controller, after a successful save of a Note, I redirect to the note's contact using:
format.html { redirect_to(@note.contact, :notice => 'Note was successfully created.') }
In my unit test, I'm testing the ability to create a note and redirect to the note's contact vi...
hi guys, can someone out there help me out with understanding how to use flexpaper for my rails application? it needs swf formats, and our rails wud converted any supported file type to pdf. i'm clueless on how to proceed further with converting pdf to swf on the fly and displaying it via the flexpaper app. if any1s aware of this, ur hel...
I'm looking to deploy two rails projects. One with Ruby 1.8.7 and Rails 2.3.8, and another with Ruby 1.9.2 and Rails 3.0.1.
I'm trying to set up a situation where www.example.com is Ruby 1.9.2 and shop.example.com is Ruby 1.8.7.
What's the best way to set this up with Passenger and RVM?
...
I have a block of this code in my helper:
if !shop.directions.blank?
"<ul>".html_safe +
shop.directions.each do |direction|
"<li>#{direction.direction}</li>".html_safe
end +
"</ul>".html_safe
else
"No directions available.".html_safe
end +
It's showing memory location of direction.direction like...
I was writing an rspec test for the destroy action of my sessions controller (Authlogic 2.1.6). I can't puzzle out what method I should call, either on the user object or the session object to determine whether the session is still "alive" (that is, that the user is or is not logged in).
My first instinct was to use @user.logged_in? bu...
Before I roll my own I'm just curious if there are any other solutions similar to heroku's docs (sinatra) or the rails guides template for making a simple faq page for a rails app. I like heroku's on sinatra and have been currently using just a simple pages controller with markdown, but i'm looking for maybe something even better suited...
Here is a list of security issues that my authentication system has to address (I know there are already plugins for this, I want to create my own -- I'm just like that! ((especially since I want to learn how to do it)).
using rails form forgery protection
storing a guid as the auth_token in the cookie, not the user id. Have this toke...
Is it possible to have a controller action do both the GET and POST?
i.e. the GET shows a form, and the POST takes the forms values and saves to the db.
...
I have a view on my current project which does something like the following(in haml):
[email protected] do |horse|
= render :partial => 'main/votingbox', :locals => {:horse => horse}
The in the _votingbox.html.haml file I have the following:
%div.votingbox
%span.name= horse.name
%div.genders
- if horse.male
%img{:src => '...
Hi
I'm developing a two player checkers website. The idea is to allow people sign up and add to a list of friends they have. They can then send or accept requests to/from a friend on their list to play a game of checkers via the site.
I'm using Ruby on Rails to develop it (It’s mandatory in case people think another language is more a...
So I've been using a number of educational software web based apps, they are games, and they are all using flash. Recently I've seen some posts about making games with ruby. Are there any good examples out there for making games with ruby. I know of the game library, and then there is one book on amazon that has some awful reviews, and t...
Hi,
I was wondering if there is a helper method, which can create a link to download a pdf file?
Thank you,
...