Hop Pocket posted:ferret Here's a question. No matter what gems and plugins I install, script/ferret_server never shows up for me. Instead I have to use vendor/plugins/acts_as_ferret/ferret_server. Where did that executable come from for you?
|
|
# ? Jan 8, 2008 18:16 |
|
|
# ? May 15, 2024 01:11 |
|
shopvac4christ posted:Here's a question. No matter what gems and plugins I install, script/ferret_server never shows up for me. Instead I have to use vendor/plugins/acts_as_ferret/ferret_server. Where did that executable come from for you? Honestly I'm not quite sure. I *think* that I followed this tutorial: http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial And somehow ended up there. On my system, those two scripts are identical.
|
# ? Jan 8, 2008 18:25 |
|
Austria posted:DreamHost is a terrible Rails host. I guess what I want to know is how do I set up my .htaccess to default to that running application... if I point to public/dispatch.fcgi nothing ever loads.
|
# ? Jan 8, 2008 18:43 |
|
I've used acts_as_solr before. What's the difference between ferret ad acts_as_solr? They both use lucene if I'm not mistaken.MrSaturn posted:horay =/ code:
edit: They don't let you install gems? Pardot fucked around with this message at 06:38 on Jan 9, 2008 |
# ? Jan 8, 2008 22:02 |
|
Anal Wink posted:I've used acts_as_solr before. What's the difference between ferret ad acts_as_solr? They both use lucene if I'm not mistaken. problem is, mongrel isn't an installed gem, and they didn't allow me to run a daemon task with just ruby script/server -d, I don't think it'll work with mongrel either...
|
# ? Jan 8, 2008 22:16 |
|
Your only real options with DreamHost is to use either CGI or FastCGI. Their wiki and knowledge base have a decent enough guide on how to set it up. I've only ever really set up Typo on there and that was using Capistrano.
|
# ? Jan 8, 2008 22:32 |
|
So an application that was getting heavy use today started throwing out a bunch of: NoMethodError (undefined method `[]' for nil:NilClass): On random places. I've never had these before, and generally the actions that would spit out the error would work fine if you just tried it again. Is this something that can be attributed to low memory? I've killed some other processes just in case. If this is low memory, what are some of the basic things I can do to optimize (in rails) and keep an eye on utilization (in linux)? Edit: I'm also only running a single mongrel instance. Does it need to be two or more? hmm yes fucked around with this message at 23:33 on Jan 8, 2008 |
# ? Jan 8, 2008 23:25 |
|
With dreamhost and fastcgi, you learn about rails optimizations really fast. I recommend everyone do it once.
|
# ? Jan 9, 2008 00:58 |
|
atastypie posted:So an application that was getting heavy use today started throwing out a bunch of:
|
# ? Jan 9, 2008 01:24 |
|
Anal Wink posted:I've used acts_as_solr before. What's the difference between ferret ad acts_as_solr? They both use lucene if I'm not mistaken. Ferret is lucene written in ruby, solr is written in Java. I'd say to stick with solr or sphinx for full text search. Funny story about that. I was at the Rails Edge conference sitting next to Ezra and asked him what he thought of Ferret. He said it was great for development but once you get to more traffic it tends to buckle. Fifteen minutes later I get an emergency "our site is down" email from the clients for whom I just deployed a ferret based solution. I've heard a bunch of reports about people deploying ferret, though, so take that with a grain of salt.
|
# ? Jan 10, 2008 22:00 |
|
Anyone have any more rails host recommendations?
|
# ? Jan 11, 2008 05:56 |
|
SeventySeven posted:Anyone have any more rails host recommendations? I'm considering using Media Temple. Anyone have any experience with them? From what I've read they sound alright, lots of features and not too pricey.
|
# ? Jan 11, 2008 13:44 |
|
I'm storing images in my rails app for reasons that probably can't change. I've heard that send_data and send_file can cause memory issues that will stay around in mongrel. What I'd really like to do is to write out the images to disk the first time they are requested, resulting in Apache serving them each time afterwards. Is there a good best practice for this? I'll be running multiple mongrels in production, so I'd be a little concerned about concurrent processes writing out the same images to disk at the same time. edit: I tried caches_page, but that seems to not remember the mime_type of the original response, resulting in my cached images being sent back in a text/html typed response edit: I also tried caches_action, but that seems to ignore response headers (Expires, Last-Modified) that I set in a filter that runs before that action for some reason. Hop Pocket fucked around with this message at 16:35 on Jan 11, 2008 |
# ? Jan 11, 2008 15:40 |
|
B1axident posted:I'm considering using Media Temple. Anyone have any experience with them? From what I've read they sound alright, lots of features and not too pricey. Assuming it's (gs), you'll hate it for Rails. I currently use it to host my email and PHP and Perl applications. It's great for this. It's performance for Rails isn't that bad, compared to most shared environments, since it uses Mongrel. Configuration and stability isn't the most reliable though. It's been enough of a headache that both myself and other people I know have left it for VPS, dedicated or EC2 hosting. If you're not too scared to set up or learn to set up your own installation of Linux, I REALLY suggest getting a VPS. Rails on shared hosting is definitely not fun. DHH's latest blog post mentions this too. For VPS, I can't recommend Slicehost more than enough. They're cheaper than Media Temple, especially if you're going to be hosting just Rails apps (Nginx and Thin is great!). If you'd like to use me as a referrer (it gets me $5 after you sign up for 3 months of hosting, but gets you nothing extra), PM me.
|
# ? Jan 11, 2008 16:02 |
|
Austria posted:For VPS, I can't recommend Slicehost more than enough. They're cheaper than Media Temple, especially if you're going to be hosting just Rails apps (Nginx and Thin is great!). If you'd like to use me as a referrer (it gets me $5 after you sign up for 3 months of hosting, but gets you nothing extra), PM me. Just checked out Slicehost, looks pretty good. Didn't really look into VPS before as I figured it would be much more expensive that a shared environment. Got a feeling I'll probably go with Slicehost, but I don't have PM
|
# ? Jan 11, 2008 16:54 |
|
Hop Pocket posted:Is there a good best practice for this? So, if your application responds to, for example, /photos/2 -> write the file to RAILS_ROOT/public/photos/2.jpg. Apache will try to serve the file first. Only when it does not exist will it send the request up to the application.
|
# ? Jan 11, 2008 17:58 |
|
skidooer posted:Write it in the public directory, under the same directory structure that your route implements. Thanks skidooer. I checked back here right after I figured out that I can put /images/show/35.png and it will give me 35 using params[:id], and it will also save it as /public/images/show/35.png. So by using page caching by writing out my links this way, they end up in the public directory. I guess my fear about doing it manually was a race condition between mongrel processes trying to write the same file to the disk on first load and somehow corrupting the cached image. atastypie posted:Something to remember: before you deploy an updated version of your app, mv the images into a temporary location or add them to the subversion repo. Otherwise you'll overwrite the folder and lose the files. Good point - thanks. Hop Pocket fucked around with this message at 23:21 on Jan 11, 2008 |
# ? Jan 11, 2008 20:14 |
|
Something to remember: before you deploy an updated version of your app, mv the images into a temporary location or add them to the subversion repo. Otherwise you'll overwrite the folder and lose the files.
|
# ? Jan 11, 2008 21:51 |
|
Austria posted:For VPS, I can't recommend Slicehost more than enough. They're cheaper than Media Temple, especially if you're going to be hosting just Rails apps (Nginx and Thin is great!). If you'd like to use me as a referrer (it gets me $5 after you sign up for 3 months of hosting, but gets you nothing extra), PM me. Seconding Slicehost. I just moved from shared hosting to a 256MB slice and the process was ridiculously smooth. A VPS has more of a learning curve than shared hosting, since you're now in charge of everything, but I credit Slicehost's exhaustive library of HOWTOs for easing that transition. I don't run Rails apps on mine, but many others in the Slicehost community do, and they appear to love it.
|
# ? Jan 12, 2008 00:07 |
|
savetheclocktower posted:Seconding Slicehost. I just moved from shared hosting to a 256MB slice and the process was ridiculously smooth. A VPS has more of a learning curve than shared hosting, since you're now in charge of everything, but I credit Slicehost's exhaustive library of HOWTOs for easing that transition. I don't run Rails apps on mine, but many others in the Slicehost community do, and they appear to love it. Thirding Slicehost. They are the best for Rails apps unless you go with Rails Machine or Engineyard, which are both *extremely* pricey. Do not go with Media Temple for a Rails app -- you will hate life. I've had poor experience with their dv for a client and a friend of mine is in the process of moving his gs to a different host, probably slicehost.
|
# ? Jan 14, 2008 06:03 |
|
Okay, so I've just "deployed" my first application, an I thought I'd share some of the things I've learned. 1) Slicehost seems pretty reasonable so far. No initial set up issues and I've only had to reimage once so far. The guides are mostly useful too. 2) I need a better way to deploy. I'm guessing SVN + Capistrano are the way to go about this. The way I just did it was to literally copy across my entire application directory, and I ran in to the following problems:
3) Fresh environments reveal deficiencies in my code. Anyone have any other advice they can offer?
|
# ? Jan 15, 2008 08:04 |
|
SeventySeven posted:I set ENV['RAILS_ENV'] ||= 'production' in environment.rb. It says do that if you can't do it the better way, but in typical Rails fashion it doesn't tell you what the better way is? A small note, I believe the usual way (at least the one I use is morelike): ruby script/server -e production The same argument can be used with mongrel_start
|
# ? Jan 15, 2008 08:12 |
|
You can run rake tasks in production by adding 'production' before the task, like so: rake production db:schema:load I believe rake tasks always assume development unless you do this. Congrats on getting your first site live. Deployment gets much easier with svn+cap and some practice. hmm yes fucked around with this message at 08:27 on Jan 15, 2008 |
# ? Jan 15, 2008 08:23 |
|
it will also follow the RAILS_ENV environment variable, so if you set that to production it should default everything to use your production database. i would recommend moving from apache to something like nginx and also investing some time into looking at capistrano.
|
# ? Jan 15, 2008 09:41 |
|
I guess it's not going as entirely smoothly as I hoped. For some reason, the live app is working differently to the app on my dev machine. This is absolutely baffling to me since I'm using the same version of Rails and MySQL on both. Is there any logical reason for this? I think I'm going to follow jonnii's advice because I'm getting too frustrated looking at this today, so I'll re-image tomorrow and try Nginx and Capistrano.
|
# ? Jan 15, 2008 10:20 |
|
what kind of differences? why not try running your app locally in production mode.
|
# ? Jan 15, 2008 11:13 |
|
jonnii posted:what kind of differences? why not try running your app locally in production mode. Just did this because I can't let it go and get to bed. Part of the live app is ignoring that a field is defined as :boolean (which treated as a TINYINT(1) in MySQL). If you print it it'll just show 0 or 1, where on the dev app it'll show a nice false or true. I've also got a method to toggle it, which looks like this: code:
What confuses me most is I've used the boolean type in another place as a very similar way, and this works fine on the live server. There's absolutely no differences in the code or DB structure these things are using - the live one is generated from the dev one.
|
# ? Jan 15, 2008 17:07 |
|
are you using the same version of mysql?
|
# ? Jan 15, 2008 18:41 |
|
It seems i'm having my own rails problems that i can't quite seem to figure out, and I was wondering if someone might be able to give me a hint to get this working. I'm trying to install mephisto on my shared host (apisnetworks, great host by the way!), and it seems that my .htaccess file in my /public directory isn't forwarding the request successfully to dispatch.fcgi for some reason. the contents of my .htaccess is: code:
Any ideas?? edit: turns out that I needed RewriteEngine On in there too. jonnii fucked around with this message at 23:07 on Jan 15, 2008 |
# ? Jan 15, 2008 22:33 |
|
jonnii posted:are you using the same version of mysql? Yes, 5.0.45 on both.
|
# ? Jan 16, 2008 03:49 |
|
I'm a total newb to web programming in general, and I wanted to get started with Ruby on Rails, but every tutorial I read kind of comes from the assumption that a person will allready know a lot about web programming. They all have this "see with PHP it would be super hard to integrate your .xml file and your .wtf" but in rails all you do is edit Blah.rhtml, and then put a tag in your Db.yml file, and I have no idea what the gently caress any of this poo poo is. I'm good at programming and ruby is a breeze to pick up, but lord all these web standards cause my head to spin. Is there a good tutorial about beginning web programming with Rails assuming one has never done it with anything else?
|
# ? Jan 18, 2008 00:06 |
|
Zaxxon posted:I'm a total newb to web programming in general, and I wanted to get started with Ruby on Rails, but every tutorial I read kind of comes from the assumption that a person will allready know a lot about web programming. They all have this "see with PHP it would be super hard to integrate your .xml file and your .wtf" but in rails all you do is edit Blah.rhtml, and then put a tag in your Db.yml file, and I have no idea what the gently caress any of this poo poo is. Well, if you're not familiar with html and css to begin with, I'd recommend you at least go through the tutorials at https://www.w3schools.org. Failing that, look up an article called "Rolling with ruby on rails". That's where I started.
|
# ? Jan 18, 2008 01:09 |
|
MrSaturn posted:Well, if you're not familiar with html and css to begin with, I'd recommend you at least go through the tutorials at https://www.w3schools.org. Failing that, look up an article called "Rolling with ruby on rails". That's where I started. I'm cool with html, and while I've never used css I at least know what they are and what they do. I've also read that tutorial and it seems to assume a lot (especially about setting up the database and such.) I mean it's halfway into that tutorial before he even touches ruby. I kinda thought the whole point of RoR is that you didn't have to gently caress with all the html and SQL stuff and could do it through ruby.
|
# ? Jan 18, 2008 01:50 |
|
Zaxxon posted:I kinda thought the whole point of RoR is that you didn't have to gently caress with all the html and SQL stuff and could do it through ruby. You're right about the point, that's a major part of it. The automation though is also based on having a strong familiarity with more manual/raw web development with php/python etc. While rails removes a lot of the boiler plate code in web development, I believe you need to have the low level knowledge to use rails without shooting yourself in the foot. I might be wrong, but RoR has a sizable learning curve even after having a strong foundation in web programming (I've been a commercial web dev for 5 years, rails dev for 6ish months).
|
# ? Jan 18, 2008 13:04 |
|
Is anyone here using a document-oriented database (such as CouchDB or ThruDB) with Rails? I've got some projects where SQL isn't the right tool for the job. There are several ActiveRecord-like abstractions (which I'd like to use) on the go, but they all seem to be in the early stages. So I'm also wondering which of those projects I should be focusing my attention on, if any.
|
# ? Jan 30, 2008 20:30 |
|
There was mention of Active Couch, which is an active record wrapper for couchdb on the rails envy podcast today. I haven't used it myself, but it could be worth looking at.
|
# ? Jan 31, 2008 04:29 |
|
Pardot posted:There was mention of Active Couch
|
# ? Jan 31, 2008 06:14 |
|
Registration for railsconf just opened up the other day. http://www.railsconf.com/quote:The content this year will also take a step up in terms of experience required for many sessions. Less “I’m just getting started, how does it work?” and more “I’ve been doing this for a while, how can I become better?”.
|
# ? Jan 31, 2008 16:31 |
|
Well I went ahead and started creating yet another CouchDB library named ActiveCushion. I couldn't find one that worked the way I envisioned it, sticking to AR conventions as much as possible, so here we are. There's more work to do before it's ready for any kind of release, but I'm quite happy with the way it's shaping up. Creating documents is not unlike doing so with ActiveRecord. There is, however, no schema. You're free to add whatever attributes you want. Validations will ensure input is sane. code:
code:
code:
code:
code:
skidooer fucked around with this message at 23:15 on Feb 1, 2008 |
# ? Feb 1, 2008 23:08 |
|
|
# ? May 15, 2024 01:11 |
|
I do love slicehost, but I'll be damned if gem does not work very well on a 256 slice. Very memory intensive. Installing one gem can take hours. I don't need a 512 slice, but am considering getting one just to make gem usage more palatable. edit: 512 slice a billion times faster. Hop Pocket fucked around with this message at 16:39 on Feb 4, 2008 |
# ? Feb 4, 2008 15:31 |