similar to: Basic Architecture Questions

Displaying 20 results from an estimated 4000 matches similar to: "Basic Architecture Questions"

2006 Feb 11
1
Fastcgi and mysql woes
Hi, I have been heck of a time to get mysql and fastcgi to work properly on my Mac OS X box. I keep getting the following error: Can''t connect to local MySQL server through socket ''/opt/local/var/run/mysql5/mysqld.sock'' (13) I have even tried commenting out the "socket" option in my database.yml but it still gives me the same error. I''m ok when I
2006 Jun 06
5
[OT] O''Reilly Cookbooks
Hi, Has anyone gotten the "roughcuts" of the Ruby and Rails cookbooks? If you have the Pragmattic Rails Cookbook is the O''Reilly worth it? Also can you download PDF''s of their "roughcuts". The website is kind of vague, it just mentions online access (whatever that means). Thanks in advance.
2006 Jun 20
0
Quiet the Logger in 1.1
I''m using Rails 1.1 and I''m trying to quiet the logger. I searched the mailing list and placed the following inside my environment.rb: RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == ''production'' ? Logger::INFO : Logger::DEBUG) But I keep getting: /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'':
2006 Jun 20
1
Mongrel+Mint
Hi, I''m attempting to migrate an app from Apache+FCGI to Apache+Mongrel. I''m using Apache 2.0 with the latest Mongrel release. I''m having an issue with the Mint stats package and Mongrel not picking up the following url: /mint/?js Basically inside the /mint folder there is an index.php, so the url /mint/?js should really be going to /mint/index.php?js When I had my
2006 Jun 23
1
@request.env and mongrel
Hi, I don''t know if this question should be posted here on the Rails list or the Mongrel list, but I''ll try here first. I had been using Aapache+FCGI and when I run the following code from my server''s domain "perficient.com" it returns "perficient.com:80": port = @request.env["SERVER_PORT"]==''80'' ? '''' :
2006 Apr 13
2
Automatic finder
It looks rails automatically creates a "finder" method on models that have a "belongs_to". So I tried this in the console: c = Category.find(2) chunks = Chunk.find_by_category(c) chunks is always returned as an empty array. When I know have some chunks with a category_id of 2. Should the find_by_category do what I think it should be doing or am I completely off base?
2006 Jun 21
1
Adding routes via plugins
Hi, I''m attempting to add a route via a plugin. I attempted to add the following to my init.rb: myroute = ActionController::Routing::Routes.connect "boo2", :controller=>''plugin'', :action=>''index'' puts "path=#{myroute.path}" myroute.options.keys.each do |k| puts "#{k}=#{myroute.options[k]}" end The newly
2006 Jun 13
0
[OT] Rico Live Grid
Hi, I was curious if anyone has implemented Rico''s Live Grid (ajaxed html tables)? Do you like it? Do your users like it? cheers, scott ---------------------------------------------------------------------------------------------------- What''s an Intel chip doing in a Mac? A whole lor more that it''s ever done in a PC. My Digital Life -
2006 Apr 05
0
apache and subdomains
Hi, I''m trying to get a subdomain to map to a controller. For example: blog.domain.com to point to /list so in my virtual host I tried: RewriteEngine On RewriteCond %{HTTP_HOST} ^blog.localhost$ RewriteCond %{REQUEST_URI} !^/blog/ RewriteRule ^(.*)$ /blog/$1 but it just goes to the root of my rails app. any ideas? scott.
2006 Apr 07
0
acts_as_taggable and tag list
Hi, I''m using the new acts_as_taggable on Rails 1.1.1. I would like to get a list of all the tags for a particular model type, in my case "Post". I got it to work with: Tag.find(:all,:include => :taggings, :conditions => "taggable_type=''Chunk''") But I''m wondering if there''s a more Rubyish elegant way. thanks, scott.
2006 Apr 07
1
Acts_as_Taggable
A couple of quick acts_as_taggable (the Rails 1.1 plugin version) 1. Can you update tags on an existing record? If I execute the tag_with statement twice it creates two rows in the taggings column, instead of updating the value of the existing tag 2. Can you delete tags? I didn''t see a method for this. If I can delete tags, problem #1 goes away. scott.
2006 Feb 16
0
Blind effect and tables
Greetings, I am trying to add a row to a table using the blind down effect. I have this working for lists (aka <li>) but not tables. With tables it seems to display the newly inserted row then blind. I basically want to start with the row hidden and then blind down. For example this works with lists: <ol style="" id="list1"> <li
2006 Feb 15
1
Per Database Migrations
Is there away to have parts of a migration file only work with a specific database. For example I am inserting some data into a table with: execute "INSERT INTO demo_lists(position, name, updated_at, created_at) VALUES (1, 1, ''scott'', CURDATE(), CURDATE());" Of course the curdate() function may only be available on mysql. So can we some how determine which
2006 Feb 16
0
RJS Question
Hi, What would my method call in an rjs template to produce something like: new Effect.BlindDown($(''commentList'').lastChild); I know if I just wanted to the blind effect I would: page.visual_effect :blind_down, "row_#{@new_item.id}" but how would I call it if I want the ".lastChild instead of passing a particular id? thanks, scott.
2006 Feb 22
5
[OT] Apache rewrite stuff...
Hi all, a little off topic, but was wondering what the best way is to re-write incoming requests so that they all end up at the same domain. For example, if I had: my_domain.net my_domain.com my_domain.org Whats the best way to map/redirect all of these to www.my_domain.com ? I know its possible, just not sure what to add for rules/virtual hosts in my apache config. Thanks for the help! -Nick
2006 May 08
6
how to make field in model immutable after create
Hello everyone! I want to have login field in User model which is set only once (on create), and then it should fail validation if the value is changed. How can I do this? I dig around for validation and tried def after_validation_on_update unless User.find_by_login(:login) errors.add(:login, "is immutable. You can''t change it") end end in model, but somewhat it
2006 Apr 12
2
Tracking page hits
Hello all, I am developing an online store and would like to keep track of how many times each product was viewed. While I can keep track of page hits using something like webalizer, this won''t really work (I don''t think) as the pages are not going to be static. Has anyone else implemented this and if so could you please point me in the right direction. A potential solution
2006 Feb 23
2
Performance problem due to ruby or fcgi or mysql?
when i "siege" a particular page on my site, my site just crashed under a very light load, and cpu usage quickly goes up to 99%. But my other pages are doing much better with load testing. So my guess initially was that sql statements with this page is the cause. However, from "tail -f production.log ", it seems that sql is doing ok and not taking much time, and
2005 Aug 31
0
FCGI Static server definition
Per the Ruby on Rails book you need something like this for a static server definition: <IfModule mod_fastcgi.c> FastCGIIpcDir /tmp/fcgi_ipc FastCGIServer /path/to/app/public/dispatch.fcgi -iniital-env RAILS_ENV=production -processes 15 -idle-timeout 60 </IfModule> So my question is if I have more than 1 app running via apache are these settings applied to each app or do I put
2006 May 12
5
How is Actionpack is not thread-safe? @@allow_concurrency?
Hi, I found many references on the Web to the fact that "Rails is not thread-safe". However, I have not found an explanation _why_ it isn''t? What happens if multiple requests are handled concurrently by ActionPack? Assuming that the code I execute in my controller methods is thread safe, is this ok? If not -- what happens? The following makes it sound like the issue is