[Rails] A few Rails 3 questions

2010-09-25 Thread Trausti Thor Johannsson
I am about to start a new project with Ruby 3. 1) How is the speed ? 2) Is it possible to host ruby3 projects on the same server as is hosting ruby 2 projects ? (with passenger) 3) Any foreseeable problems I will run into ? Trausti -- You received this message because you are subscribed to

Re: [Rails] sqlite specified in database.yml, rails tries to use mysql

2010-06-04 Thread Trausti Thor Johannsson
Have you checked which environment you are running in ? Have you removed ALL mysql config from database.yml ? Trausti On Fri, Jun 4, 2010 at 8:40 PM, Les Peabody li...@ruby-forum.com wrote: Hi All, I've run into an interesting (and annoying) problem.  I have a development environment on a

Re: [Rails] Re: Looking for Easy Rails hosting

2010-05-18 Thread Trausti Thor Johannsson
dreamhost.com, they are quite cheap and give you a chance to grow up for very little money. Then you can grow into a vps at their site or move elsewhere. What they offer is pretty much unlimited bandwith and diskspace and they have a very nice cpanel. Store as many sites as you want. On Tue,

Re: [Rails] Re: Best HOST and web server

2010-05-04 Thread Trausti Thor Johannsson
I've used slicehost and rackspace. I like slicehost, but rackspace is much cheaper and much faster and has better bandwith. Somehow I ended up on Amazon AWS though. But I keep using rackspace. Trausti On Tue, May 4, 2010 at 10:17 PM, David Zhu dzwestwindso...@gmail.com wrote: so what

Re: [Rails] Re: RAILS not SCALABLE?

2010-04-22 Thread Trausti Thor Johannsson
Scaling problems is what happens when you all of the sudden need to figure out where to put your 5.000 servers all running 2xQuad core cpus and have 128 GB memory. Facebook has 50.000 cache servers, thats ONLY for cache. If your site can run on a handful of servers, you don't really have a

Re: [Rails] Re: Anyone know of a Rails POS (point-of-sale) app?

2010-04-21 Thread Trausti Thor Johannsson
Potion Factory has a free web store made with rails, open source that connects to Paypal. http://www.potionfactory.com/free/ Trausti On Wed, Apr 21, 2010 at 4:18 PM, agung sukariman putra agungsukari...@gmail.com wrote: its that true  brother ? amazing,.. i'll check soon.. -- You received

[Rails] A very weird bug in ruby

2010-04-17 Thread Trausti Thor Johannsson
Yes yes, I think I have found my 2nd compiler bug (not counting realbasic). I think I found an actual bug in Ruby, on all platforms none the less (well linux and mac). if yu just run console or irb and do this ph = no.305.week b = ph+5 returns no.305.week5 then do b.delete ph and it returns

Re: [Rails] Re: A very weird bug in ruby

2010-04-17 Thread Trausti Thor Johannsson
Ah ha. That makes delete actually quite cool function. Thank you. Trausti On Sat, Apr 17, 2010 at 12:48 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 17, 10:27 am, Trausti Thor Johannsson traust...@gmail.com wrote: Yes yes, I think I have found my 2nd compiler bug

Re: [Rails] Re: Console not working

2010-02-11 Thread Trausti Thor Johannsson
: Trausti Thor Johannsson wrote: This seems to be contagious as now my Mac and other linux boxes that I know have worked, don't work any more. When I start script/console, I get the prompt but no application objects, no models, no database. What am I doing that is so wrong that the application

[Rails] Re: Console not working

2010-02-10 Thread Trausti Thor Johannsson
can't test stuff in the console ? Can this be because of ruby enterprise ? Best regards, Trausti On Mon, Feb 8, 2010 at 10:36 AM, Trausti Thor Johannsson traust...@gmail.com wrote: I just installed Centos 5.4 64 bit.  Nothing out of the ordinary, but this is a plain vanilla installation

[Rails] Console not working

2010-02-08 Thread Trausti Thor Johannsson
I just installed Centos 5.4 64 bit. Nothing out of the ordinary, but this is a plain vanilla installation with ruby enterprise and passenger. My app works as it should, but when I try to run 'script/console' it does not load my models. I have to manually load them. Does anyone know why this

Re: [Rails] Re: shear madness

2009-12-15 Thread Trausti Thor Johannsson
You always miss out on features coming in new versions, so why get started with anything at anytime ? Trausti On Tue, Dec 15, 2009 at 9:26 PM, andkjaer andkjaer@gmail.com wrote: But what about new features, won't I miss out on some cool new stuff? On 15 Dec., 21:03, Satyajit Malugu

Re: [Rails] Re: Massive memory eating

2009-12-04 Thread Trausti Thor Johannsson
peter.de.be...@pandora.be wrote: On 01 Dec 2009, at 13:45, Trausti Thor Johannsson wrote: It consumes less memory if I don't create thumbnails. OK, let's go one step further then and boil it down to RMagick (and not ImageMagick): install the mini_magick gem and change the thumbnail processor

Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
Now I just installed mod_porter and all. But when I use passenger-memory-stats I can see that my app uses 194 MB memory, I upload 1 picture and bang it uses 285 MB and 2nd picture it uses 316 MB. This is just ridiculous for an app that only does one thing, upload pictures and display

Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
On Tue, Dec 1, 2009 at 10:18 AM, Peter De Berdt peter.de.be...@pandora.be wrote: On 01 Dec 2009, at 09:51, Trausti Thor Johannsson wrote: Now I just installed mod_porter and all.  But when I use passenger-memory-stats I can see that my app uses 194 MB memory, I upload 1 picture and bang

Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
De Berdt peter.de.be...@pandora.be wrote: On 01 Dec 2009, at 10:39, Trausti Thor Johannsson wrote: Thats all, I just updated passenger to 2.2.7 but just by uploading one picture, private memory grows from 10.5 MB to 81.5 (with picture size 1.5 MB) and with next picture 118 MB I never ever

Re: [Rails] Re: Massive memory eating

2009-12-01 Thread Trausti Thor Johannsson
suggest leaving thumbnailing out for a second and just saving the uploaded file to see if it is in fact the thumbnailing that eats your memory. We can work our way down from there. On 01 Dec 2009, at 11:56, Trausti Thor Johannsson wrote: Before - Passenger processes - PID    VMSize

Re: [Rails] Massive memory eating

2009-11-30 Thread Trausti Thor Johannsson
restart it. However, tuning aside, if you are finding your volume is requiring more RAM, you might need to bump your hardware to support it. On Nov 29, 2009, at 5:47 PM, Trausti Thor Johannsson wrote: Hi All, I have a small ruby on rails site, using passenger and apache.  The site

Re: [Rails] Re: Massive memory eating

2009-11-30 Thread Trausti Thor Johannsson
Do I just add this module in my apache, and don't have to do anything in particular to my ruby stuff ? Trausti On Mon, Nov 30, 2009 at 9:14 AM, lancecarl...@gmail.com lancecarl...@gmail.com wrote: http://www.therailsway.com/2009/4/23/uploading-files On Nov 29, 5:47 pm, Trausti Thor

Re: [Rails] Re: Massive memory eating

2009-11-30 Thread Trausti Thor Johannsson
opened while being saved, but you are not closing the files? Chris On Nov 29, 2:47 pm, Trausti Thor Johannsson traust...@gmail.com wrote: Hi All, I have a small ruby on rails site, using passenger and apache.  The site is moderately successful.  It allows people to upload photos.  It seems like

[Rails] Massive memory eating

2009-11-29 Thread Trausti Thor Johannsson
Hi All, I have a small ruby on rails site, using passenger and apache. The site is moderately successful. It allows people to upload photos. It seems like when people upload photos, the memory is never returned, or very late, so on a busy day I can start to use 1 GB of swap in 30 minutes. I

[Rails] passenger memory

2009-11-23 Thread Trausti Thor Johannsson
Hi All, I am using ruby-enterprise-1.8.7-20090928 and passenger on Centos 5.2, x86_64. passenger-memory-stats gives me that my app is using 466 MB (and growing). What can I do to prevent this enormous eating ? Best regards, Trausti -- You received this message because you are subscribed

[Rails] Re: reservation system for hotel

2009-11-13 Thread Trausti Thor Johannsson
Simple. Two tables. Rooms : Has info like double bed, fridge, size and such. costs : might need a better name room_id day price Then you would say something like room has many costs And then I would just use julian dates and you can easily ask each room for dates in a given range.

[Rails] Re: What's your favorite thing about Rails?

2009-10-30 Thread Trausti Thor Johannsson
Migrations among so many other things, and of course Ruby Trausti On Fri, Oct 30, 2009 at 10:25 PM, Marnen Laibow-Koser rails-mailing-l...@andreas-s.net wrote: Philip Hallstrom wrote: What do seasoned developers really enjoy about Rails. How does it make your life easier? This is

[Rails] GIT help

2009-10-26 Thread Trausti Thor Johannsson
Hi All, I have my own development area on my laptop, and I of course use git extensively. Then once I am done with required changes I do 'git push origin master'. But I always have to do 'git reset --hard' to make my changes active. I know there must be a better way. Just to clarify, I never

[Rails] Re: Ruby Video Tutorials

2009-10-20 Thread Trausti Thor Johannsson
You really can't have searched a lot or you don't use google :) Youtube is practically full of rails and ruby videos. Peepcode has the best ones, go to peepcode.com and buy rails I and rails II Also on iTunes store, there are quite a lot of video podcasts that have to do with rails, and cost $0

[Rails] Re: Reflections on Site5 and Eleven2 for Rails

2009-10-16 Thread Trausti Thor Johannsson
I am in Norway, and I have a few servers with Slicehost and Dreamhost, all located in USA, and I can't complain about speed. I am able to fully utilize my ADSL upload and download from my servers, and I have 4000 bits ADSL, no slouch. I would always go with speedy servers vs speedy service.

[Rails] cms system

2009-10-13 Thread Trausti Thor Johannsson
Hi All, I am looking for some system written in Rails (of course) that is similar to Joomla or Liferay or ezpublish. I have only found a few mentioned on the http://www.ajaxlines.com/ajax/stuff/article/top_ruby_cms.php but they all are small cms'es it seems. Anyone out there that knows something

[Rails] Re: Best RoR developer freelance tools

2009-10-09 Thread Trausti Thor Johannsson
I mainly use On the Job, but that is single user. I would use basecamp if I was working with others. Trausti On Fri, Oct 9, 2009 at 10:34 AM, Leonardo Mateo leonardoma...@gmail.comwrote: On Fri, Oct 9, 2009 at 10:12 AM, CNNN NICK rails-mailing-l...@andreas-s.net wrote: Hi, Was

[Rails] Re: Scaling database. The easiest one!?

2009-10-06 Thread Trausti Thor Johannsson
Scaling read queries with mysql is drop dead simple. Just add replicas. But you only have one server to do inputs on.Real simple. But a Quad core machine with a little memory, 16 GB, you can serve hundred thousand people easily. We do hundreds of thousands of heavy queries every minute on one

[Rails] Re: mysql + Snow Leopard + Rails

2009-10-04 Thread Trausti Thor Johannsson
This error is simple. Your database config file is incorrect. Make sure you have the right password there. you can always try in command line 'mysql -u root -p' press enter and type in the password. If it works, it is correct. Trausti On Sun, Oct 4, 2009 at 8:23 AM, tspore tsp...@gmail.com

[Rails] Re: Cheapest Rails Hosting where they give you full access to Apache (to load modules etc)???

2009-09-26 Thread Trausti Thor Johannsson
Dreamhost.com is cheap, but does not allow any httpd changes, but you can do .htaccess files.But slicehost.com is by far the best I have seen. You just get a linux box, and you can then setup the server as you see fit, want to use mongrel, use mongrel, want ngnx or lighttpd instead of apache.

[Rails] Re: Mysql and Snow leopard

2009-09-04 Thread Trausti Thor Johannsson
I did run the passanger-install-apache-modules Trausti On Thu, Sep 3, 2009 at 9:17 PM, Rick DeNatale rick.denat...@gmail.comwrote: On Thu, Sep 3, 2009 at 3:04 PM, Trausti Thor Johannssontraust...@gmail.com wrote: After installing mysql 64 bit, that did the trick. But passenger gives me

[Rails] Re: Mysql and Snow leopard

2009-09-03 Thread Trausti Thor Johannsson
Not checked that much. Trausti On Thu, Sep 3, 2009 at 2:57 AM, Jeremy Kemper jer...@bitsweat.net wrote: On Wed, Sep 2, 2009 at 3:47 PM, Trausti Thor Johannssontraust...@gmail.com wrote: I can't get mysql gem installed on snow leopard. On Leopard (10.5) all I did was sudo gem install

[Rails] Re: Mysql and Snow leopard

2009-09-03 Thread Trausti Thor Johannsson
After installing mysql 64 bit, that did the trick. But passenger gives me this error : [Thu Sep 03 18:17:57 2009] [notice] child pid 85922 exit signal Bus error (10) [Thu Sep 03 18:17:57 2009] [notice] child pid 85921 exit signal Bus error (10) [Thu Sep 03 18:17:57 2009] [notice] child pid 85920

[Rails] Mysql and Snow leopard

2009-09-02 Thread Trausti Thor Johannsson
I can't get mysql gem installed on snow leopard. On Leopard (10.5) all I did was sudo gem install -- --with-mysql-config=/path/to/mysql_config But that doesn't work any more, and i get tons of No definition for XXX Ideas ? Trausti --~--~-~--~~~---~--~~ You

[Rails] Ready to use tinymce

2009-09-01 Thread Trausti Thor Johannsson
Hi, Does anyone have a ready to use tinymce with image upload capability that either allows to upload pictures through a controller or better yet allows you only to pick already uploaded pictures ? My controller is called photos, if that helps. Trausti

[Rails] Re: Ruby on Rails Project Opportunities

2009-09-01 Thread Trausti Thor Johannsson
But a company with googlemail.com (not even gmail) ? That smells like a spam Trausti On Tue, Sep 1, 2009 at 10:57 PM, Marnen Laibow-Koserrails-mailing-l...@andreas-s.net wrote: Aldric Giacomoni wrote: This is spam. 'Benelux' is where today's Europe comes from (Belgium - Netherlands -

[Rails] Re: Snow Leopard advice for Ruby/Rails developers

2009-08-30 Thread Trausti Thor Johannsson
All is broken on my computer after snow leopard. Sphinx doesn't work, ImageMagick doesn't, rmagick doesn't, mysql plugin has failed and quite possibly more things. All besides rails work much better than before. Trausti On Sun, Aug 30, 2009 at 4:24 PM, Rick DeNatalerick.denat...@gmail.com

[Rails] Re: Anything but Aptana

2009-08-25 Thread Trausti Thor Johannsson
Does Emacs have any rails plugins ? (of course it does, but what are they ? ) Trausti On Tue, Aug 25, 2009 at 11:47 PM, Greg Donaldgdon...@gmail.com wrote: On Tue, Aug 25, 2009 at 6:39 AM, RVincervinc...@hotmail.com wrote: Not trying to get into a What's a good IDE here, BUTOn

[Rails] Re: tiny_mce plugin

2009-08-23 Thread Trausti Thor Johannsson
, :create]) On Aug 22, 1:54 pm, Trausti Thor Johannsson traust...@gmail.com wrote: Yes, this is exactly as I did it. But as I do :plugins = %w{ table ... } They do not appear.  If I use plugins, do I change the :theme to something else ? Trausti On Sat, Aug 22, 2009 at 12:17 AM, heimdullfre

[Rails] Re: tiny_mce plugin

2009-08-23 Thread Trausti Thor Johannsson
application.html.erb (layout) head %= include_tiny_mce_if_needed % /head in the view: %= f.text_area content, :class = 'mceEditor' % On Aug 21, 1:44 pm, Trausti Thor Johannsson traust...@gmail.com wrote: Hi all, I just installed the tiny_mce plugin and it works as advertised

[Rails] Re: tiny_mce plugin

2009-08-22 Thread Trausti Thor Johannsson
%= include_tiny_mce_if_needed % /head in the view: %= f.text_area content, :class = 'mceEditor' % On Aug 21, 1:44 pm, Trausti Thor Johannsson traust...@gmail.com wrote: Hi all, I just installed the tiny_mce plugin and it works as advertised.  But I can not get any plugin for tinymce

[Rails] Re: tiny_mce plugin

2009-08-22 Thread Trausti Thor Johannsson
}},                :only = [:new, :edit, :update, :create]) On Aug 22, 1:54 pm, Trausti Thor Johannsson traust...@gmail.com wrote: Yes, this is exactly as I did it. But as I do :plugins = %w{ table ... } They do not appear.  If I use plugins, do I change the :theme to something else ? Trausti

[Rails] tiny_mce plugin

2009-08-21 Thread Trausti Thor Johannsson
Hi all, I just installed the tiny_mce plugin and it works as advertised. But I can not get any plugin for tinymce to work. They are all there, they are installed, they load. But they do not appear. I have MacBook Pro OS X 10.5.8, core2duo. Running XAMPP, and Ruby on Rails 2.3.3, ruby 1.8.6

[Rails] Re: Secure Form question

2009-08-19 Thread Trausti Thor Johannsson
. Actually i think it is completely different. That is protection from csrf attacts, whereas Trausti is (I think) concerned about a user editing the page to change the value of a hidden field or things like that. Fred On Aug 19, 2:47 pm, Trausti Thor Johannsson traust...@gmail.com wrote

[Rails] Re: Difference Between ROR and Django...

2009-08-17 Thread Trausti Thor Johannsson
Well, if you want to hear what is bad about python, ask here and ask the python people about ruby. As for learning something carrier wise, learn both and learn php and cakephp. If you only know one, you are not very good. Also, you pick one and become really good with it, that is the best

[Rails] Re: railslist.com - an opensource craigslist!

2009-08-16 Thread Trausti Thor Johannsson
Yes, why the exact same look ? IMHO the look of craigslist is to cluttered, and the design is most likely copyrighted. Looks fast. Trausti On Mon, Aug 17, 2009 at 12:34 AM, robrgrann...@yahoo.com wrote: Why go with the same design as craigslist? I posted an ad and the speed it hit my email

[Rails] Passenger error on Acts_as_attachment_fu

2009-08-15 Thread Trausti Thor Johannsson
Hi All, I just installed acts_as_attachemnt_fu and it works on Mongrel and Webrick, but not on phusion passenger. I am totally stumped, and there is no log anywhere to say what is wrong, just this error : The server encountered an internal error and was unable to complete your request. Either

[Rails] Re: CSS Books

2009-08-15 Thread Trausti Thor Johannsson
sitepoint.com has a lot of them.  But Web Design for Developers from pragmatic is the best when you want to get started with everything. Trausti On Sat, Aug 15, 2009 at 11:29 AM, Conrad Taylor conra...@gmail.com wrote: On Sat, Aug 15, 2009 at 1:59 AM, Fla As rails-mailing-l...@andreas-s.net

[Rails] Re: Passenger error on Acts_as_attachment_fu

2009-08-15 Thread Trausti Thor Johannsson
I ust found out why. For some reason it refused to write larger files, but when I put this in the virtual host file : PassengerUploadBufferDir /tmp Everything works as planned now. Trausti On Sat, Aug 15, 2009 at 12:01 PM, Trausti Thor Johannssontraust...@gmail.com wrote: Hi All, I just

[Rails] Re: EC2 - EBS - S3 ?

2009-08-14 Thread Trausti Thor Johannsson
Not trying to offend you, really. But how about getting big before planning sharding ? You can get really big with just tweaking mysql on a 4 core server and then you can have loads of memory and eventually you can keep everything in memory. Then you can cache the site, and then you can put

[Rails] Search words and sessions

2009-08-12 Thread Trausti Thor Johannsson
Hi All, I am implementing a search for my blog. I have it as you can type in tags and words, and I keep them as session variables. I was just thinking if this was a good idea ? I saw on learning ruby on rails, that Ryan put such a search in a model and kept it in a database. My site is hardly

[Rails] Re: Installation difficulites

2009-08-06 Thread Trausti Thor Johannsson
One thing, Ruby is not in /usr/local/bin but in /usr/bin. If your scripts require ruby to be in /usr/local/bin you can do this sudo ln -s /usr/bin/ruby /usr/local/bin/ruby And be done with it. What I have done is to install XAMPP on my Mac, and remember to install the Dev tools also (there are

[Rails] Re: Separate App an DB servers , Scabality and rails

2009-08-06 Thread Trausti Thor Johannsson
What you should consider first is to use cache. First and foremost, try memcached. Just store the results from database find, then you never touch the database except for writing and then for the first time reading after the write. Also, you can use varnish cache, similar to a proxy server in

[Rails] Re: counting a users adverts and then doing stuff

2009-08-06 Thread Trausti Thor Johannsson
As yo explain this problem, you could just check the number of adverts the user has in the add function. Something like this pseudo code def add adverts = User.adverts if adverts.length 3 flash too many adverts redirect back else all is normal and the user can add adverts

[Rails] Re: gem install

2009-08-06 Thread Trausti Thor Johannsson
It looks like you don't have rights to install the gems. Become root and then install the gems.If you are installing them to your home directory make sure you have full write privileges on your .gem directory chmod -R 775 .gem would do the trick Trausti On Thu, Aug 6, 2009 at 11:03 AM,

[Rails] Re: counting a users adverts and then doing stuff

2009-08-06 Thread Trausti Thor Johannsson
Yes, the action in your adverts controller to create new adverts. I usually call these add, not very restful I know. Trausti On Thu, Aug 6, 2009 at 11:44 AM, bingo bob rails-mailing-l...@andreas-s.net wrote: Aha ! didn't think of this, looks like I've overcomplicated things - of course !

[Rails] Re: counting a users adverts and then doing stuff

2009-08-06 Thread Trausti Thor Johannsson
When a user wants to add an advert, what action does he call first ? Trausti On Thu, Aug 6, 2009 at 11:53 AM, bingo bob rails-mailing-l...@andreas-s.net wrote: OK, but the New action or the Create ? -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Best place to host ROR website

2009-08-06 Thread Trausti Thor Johannsson
Depends on how good sys admin you are. VPS/Slice is better in my opinion. I would recommend Dreamhost as a rails host. They were probably the first ones to use Phusion Passenger. They don't cost much, and they also have a dedicated host for you. I use them for one of my high traffic site