What exactly is the difference in rails between dev and prod environments.
When I develop an application in dev mode, do I have peformance problems, or others if I clone my dev environment on prod?
if somebody type URL/frewfrefew, he gets a routing error.
how do i get this invalids routes to point to the main page of the application in Rails.
thnaks
Hello,
I was using the spawn plugin (http://rubyforge.org/projects/spawn/) which worked excellent. However, I then moved to Mongo (using mongo_mapper) and Spawn no longer worked.
Modifying the plugin is beyond the scope of my abilities. Is there a simple way to do spawning in Rails that would work with Mongo? It's not an often-run process so it doesn't have to be the most elegant solution in the world.
Thanks!
I have a link on a website that says "add object". When I do this, an AJAX call is made and I want to do the following things:
1) if the container in the session does not exist, create one, else use existing
2) add the object to the container
I'm new to RESTful design and am wondering how to best accomplish this in Rails. Step #1 in particular
I'm currently working on a largish Ruby onRails project. It's old enough and big enough that it's not clear if all views are actually in use.
Is there any script/plugin out there that can generate a list of unused view files?
Hi, I am new to ruby onrails.
I want to build an RSS feed aggregator.
How do I find out the trending topics from the stream of data[titles] from various RSS feeds.
Could you help me how to achieve this??
Looking forward for your help
Thanks in advance
Gautam
Hi,
I have a list of rows in an excel sheet which I need to load as historical transactions into a table in my rails applications. I saved the excel file as a csv file. I tried using csv from the standard library but keep getting the following exception CSV::IllegalFormatError.
Not sure how to even figure out where the problem lies. Any suggestions on how to do this.
thanks,
ash
I have both a text_field and a text_area in Rails, and I want to disable the browser's auto-complete. Setting the attribute in either the text_field, text_area, or in the form itself, doesn't seem to make the browser stop trying to auto-complete. This is for Firefox 3.6.3 on OS X. Maybe it's more a browser issue than a RoR issue.
Thanks!
Hi, I want to add a revision counter to my rails app.
Not the number of commits necessary but the number of live pushes/deployments for example.
I'm using github as my remote repo.
Any suggestions?
Thanks
Has accept_nested_attributes_for already works with Rails 2.3.5 and Ruby 1.9.1????
I keep getting this error
undefined method accept_nested_attributes_for' for #<Class:0x00000108da2140>
Hi...In Rails, is it ok to define logic in a controller with a model. For example, take there is an User Model, which is good design.
1)Leaving the UserModel with the CRUD models and moving all the other User Specific actions to a separate controller or
2)Add the user specific actions to the same UserModels
Thanks :)
I'm trying put an if statement directly into a select field in rails, with no success.
Here is what I've tried:
<%= f.select (:book_id,{
if @a!=1
"Harry Potter", 1,
end
if @b!=2
"Lord of the Rings", 2,
end
end %>`
Any ideas?
Hey everyone,
I am working on a simple blogging type ruby onrails application and I have everything working through tinyMCE for a nice WYSIWYG editor so the user can add some simple things like images/youtube videos and lists. What I am looking for is a nice solution for blacklisting certain elements to be filtered out of the data when it is displayed.
So is there a solution for this available as a gem or available to download anywhere?
Thanks!
Is it possible to configure rails to show logger.debug messages (from logger.debug statements inside controllers) to display inside test.log (or to the console) when running unit and functional tests?
I added the following to test_helper.rb. I see messages from logger.debug statements directly inside tests but no messages from logger statements inside controller methods?
def logger
RAILS_DEFAULT_LOGGER
end
Hi folks, i have a function that converts an array to a hash which i would like to use across all the model, controller and view files in the rails app.
Does this violate some core design principle, or am i missing something really obvious?
My original question and accepted solution was posted here: http://stackoverflow.com/questions/2483640/rails-association-question. Check that out first.
My follow-up question is this:
I want to return an object that has both the user attributes and the race attributes. That way I can access, for example, the user's name and the fastest_time. How can this be accomplished? I've tried several approaches, but none I've been satisfied with.
I'm attempting to track my dependencies with git-submodules in my rails app. So far I've added submodules for things like, haml, shoulda, authlogic, etc to 'vendor/plugins'. I've seen indications that I should be using 'vendor/gems' instead though.
Question, which directory is the appropriate place to put dependencies being tracked as submodules? Is the choice arbitrary?
Thanks
Hey,
where would I place additions to stdlib classes in a rails project? Let's say something like:
class Date
def foo
'foo'
end
end
I thought about the initializer folder but it somehow felt wrong. Ideas?
Is it possible to do a redirect in the routes file of a Rails app?
Specifically, I'd like to forward /j/e to /javascripts/embed.js
Right now the only way I can think to do it is to create a j controller with an e method that redirects to that.
I've installed just about every library/gem that I could find for memcached/memcache, but everytime I attempt to run my application I get this error:
Error message:
uninitialized constant Rails::Initializer::MemCache
Exception class:
NameError
I have tried $ telnet localhost 11211 and memcached is definitely running. Any ideas?
(I'm running Apache2/Passenger)
can't seem to get my seeds.rb file to run through the command "rake db:seed". I'm using netbeans and I'm a beginner to rails, so I could be doing something really simple and stupid =/. I know you're meant to put your seeds.rb file in the db directory but netbeans doesn't seem to have one or might have renamed it... any help out there?
Thanks in advance!
Tried doing http://davidwparker.com/2008/09/17/site-wide-announcements-in-rails-using-jquery-jgrowl/
Am really bad with JS. Think I am messing up on the last part where it says "This code goes in your application.js file (somewhere in $(function){ //here })"
Am I not suppose to do a link_to_function and create a function with this code that references that link?
Really lost on this one.
Does anyone know how to make rspec follow a redirect (in a controller spec)? (e.g test/unit has follow_redirect!)
I have tried "follow_redirect!" and "follow_redirect" but only get
undefined method `follow_redirect!' for #<Spec::Rails::Example::ControllerExampleGroup::Subclass_1:0xb6df5294>