I would like to unfreeze the gems which where previously rake gems:unpacked. What is the operation for this? So far I know only the method of rm -r vendor/gems. For rake rails:freeze:edge there is rake rails:unfreeze. Is there such inverse rake task for gems too?
...
I am making an XML schema for an XML document* and I am getting stuck on something which seems like it should be relatively simple to do. Take the following XML snippet:
<some_element value="Yes" type="boolean">1</some_element >
In this case, I want to restrict the content of some_element to boolean values (xs:boolean) and I want to ...
D:\PROJECTS\RubyOnRail\webapp\Welcome>ruby script\server
=> Booting WEBrick
=> Rails 2.3.4 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-01-31 21:19:34] INFO WEBrick 1.3.1
[2010-01-31 21:19:34] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2010-01-31 21:19:34] INFO WEBrick::HTT...
I'm using jQuery in my current Rails project and I'd like to have some way to use the translations from my yml files in Javascript.
I know that I can easily use them in my .js.erb templates. But what about the javascript files in /public/javascript?
It looks like Babilu (http://github.com/toretore/babilu) would do exactly what I want. ...
I need to pass a correct URL to a javascript function in one of my GSPs. I don't want to just hard code it just in case the mappings for that URL ever change.
I know in Rails I would use the url_for method such as:
<%= url_for :controller => 'something', :action => 'edit', :id => 3 %>
How would I do this in Grails? I can't seem to ...
Like it is in many newsletter services, I want to use Ruby on Rails to write a Newsletter. Now I want to provide a link in this email to view this newsletter in a browser, if the email is not shown correctly in Email Client. How can I do this?
...
I have an app deployed on heroku which uses postgres. The app is not stable...works sometimes and sometimes gives the custom 500 page error.
Code that it is giving error on:
def login
session[:user_id] = nil
if request.post?
if @user = User.authenticate(params[:user][:userid], params[:user][:password])
sessio...
Hi, I need some help.
I have a model Journey which has many Users (drivers). I want to be able with help of accepts_nested_attributes_for to add and remove drivers from a journey. When I add a driver I want to show the user a <select> where she can select one of the users to be one of the drivers belonging to that particular journey. I ...
I am writing my first Ruby on Rails application and need to implement a "search" feature. It will need to search the database (1 column per table in 3 different tables), and return the most relevant results in each of the 3 categories. Kind of like how you can do a search on Amazon.com that will return results from all the different depa...
I am getting the following error when uploading an image on the admin panel of spree (RoR e-commerce platform):
Paperclip::NotIdentifiedByImageMagickError in Admin/imagesController#create
/tmp/stream.4724.0 is not recognized by the 'identify' command.
Any ideas? Thanks.
...
Is there a way that I can deploy my locally made rails app on a shared host that has Ruby installed?
...
I have a 'Cost' model in rails. Something like the following:
class Cost < ActiveRecord::Base
belongs_to :cost_type
has_many :cost_distributions
attr_accessor :epp
def initialize()
end
However, in my tests, when I try to create new instance with the empty constructor
cost = Cost.new
I get an error: wrong...
Hi,
I just installed the rails-settings plugin to help manage the configuration of my app. I can declare settings with namespaces like so:
Settings['preferences.color'] = :blue
Settings['preferences.size'] = :large
Settings['license.key'] = 'ABC-DEF'
However, according to the documentation, I should be able to return all the se...
Hi,
I am going to upload all of my photos to an Apache web server - they're all in folders & sub-folders. Filenames are not descriptive and I don't care about the meta data.
I've worked with PHP Gallery before, but find the process of creating albums, etc. a little laborious. I just want to rsync my local photo folders with my web site...
I created a Ruby-on-Rails project using NetBean 6.8, which operates as expected on port 3000.
I created a second RoR project in the NetBeans IDE to experiment with some ideas; it operates on port 3010. Unfortunately, the webserver won't start. It returns the following:
/Library/Ruby/Site/1.8/rubygems.rb:827:in `report_activate_error'...
I'm accessing a rails model with the typical primary key id. However, when I access it in a method, I get the following warning.
Object#id will be deprecated; use Object#object_id
It seems it's getting confused between object id, and the primary key for the model. is there a way to make sure its using the field id?
...
I am working on a rails application where one user class named (submitters) are able to login and once they are logged in they create videos. My videos controller is here:
class VideosController < ApplicationController
def index
@videos = Video.find :all
end
def new
@submitter = current_submitter
@video = @submitter....
I'm adding a password reset feature to my Rails application that uses Authlogic. I was following the guide here: http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic/ and everything works as I'd like except for one thing: the password reset form accepts blank passwords and simply doesn't change them.
I've been s...
I'm trying to connect the values of two join tables that I have and show the results based on a conditional relationship...and i'm having some problems
I have a Users Model(:name, :password, :email), and Events model(:name, :etc) and Interests model (:name)
I created about 5 records in each model.
Then I created two join tables -> Use...
I'm using ActiveSupport's to_xml to generate some xml from a hash.
I have need for the this ruby:
:Shipment => {
:Packages => [
{:weight => '5', :type => 'box'},
{:weight => '3', :type => 'tube'}
]
}
To generate this xml:
<Shipment>
<Package>
<weight>5</weight>
<type>box</type>
</Package>
<Package>
<wei...