Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ghotli
Dec 31, 2005

what am art?
art am what?
what.

nebby posted:

I have yet to bite the bullet, but running multithreaded Rails on JRuby is going to be a big win for us theoretically. (We're running JRuby now, but on Rails 2.1 with Ruby Runtime pooling.) Faster server restarts and dramatically reduced memory, since it does not have to cache the ASTs for all the gems N times.

We evaluated JRuby at work for a good while but eventually scrapped it. This was a while back and I assume JRuby has matured. Can you describe your deployement method with JRuby?

Adbot
ADBOT LOVES YOU

Ghotli
Dec 31, 2005

what am art?
art am what?
what.

nebby posted:

jruby...

I assume you're using glassfish v2 since v3 isn't stable yet. At work we have a few rails applications that we need deployed at the same time. When we were looking into glassfish I remember v2 not being able to host more than one rails app at a time. Do you have any idea if this is true or not?

We also had a whole lot of trouble getting warbler to work correctly. Obviously it's stable enough now for you to use in production. Do you have capistrano create the war file on the production server? If so could you show us the code for how you did that. Also, what is your rationale for warming up the production servers with curl. Is this so you can keep the rails environment in memory?

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
If it's mission critical for you to be able to access COM objects you might not want to go with rails. That said, you can probably access COM objects through java if you use jRuby. Jruby allows you to mix and match java and ruby code in your rails application. The COM stuff could be written through java over some sort of COM bridge. There are some downsides to JRuby though, like the fact that you cannot use any gems that have anything that compiles natively in C. You have to rewrite those gem's functionality in java or use a java backed gem that has been created.

Anyway COM with rails sounds like more trouble than it's worth.

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
Maybe I just don't get it. It took me a few days of scouring google and the capistrano documentation when I built our initial infrastructure. Now we've been using it for over a year with no problems. One command to deploy and another to migrate is quite nice.

I set up my git repository using gitosis and ssh public keys. The webserver and my user on the staging and production servers are in the same group. As is everyone on my development team. Here's my capfile for the perusal.

deploy.rb posted:

set :application, "appname"

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/var/rails/#{application}"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
set :scm, :git
set :repository, "git@gitserver.domain.com:#{application}.git"
set :branch, "master"
set :deploy_via, :remote_cache

# supposedly helps with ssh to git repo
set :ssh_options, { :forward_agent => true }

# sudo causes permissions hell
set :use_sudo, false

# deploy to staging with:
# cap staging deploy
task :staging do
role :app, "staging.domain.com"
role :web, "staging.domain.com"
role :db, "staging.domain.com", :primary => true
end

# deploy to production with:
# cap production deploy
task :production do
role :app, "production.domain.com"
role :web, "production.domain.com"
role :db, "production.domain.com", :primary => true
end

# Add in stuff to turn off mongrels and turn on passenger
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "ln -s #{deploy_to}/shared/database.yml #{current_path}/config/database.yml"
run "touch #{current_path}/tmp/restart.txt"
end

[:start, :stop].each do |t|
desc "#{t} task is a no-op with mod_rails"
task t, :roles => :app do ; end
end
end

Ghotli fucked around with this message at 06:33 on Feb 20, 2009

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
That apidock site is great. I was previously unaware of it. I find the official ruby on rails guides to be well written too. They are usually my go-to place for looking something up quickly.

http://guides.rubyonrails.org/

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
Ubuntu 9.04 came with much better support for Ruby 1.8 than previous versions. Ruby 1.9 on the other hand needs to be built from source. Apt ships with 1.9.0 and 1.9.1 is the stable version now. I found this out the hard way quite recently.

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
This guy said what I wanted to say but better. Installing Ubuntu inside of VirtualBox or VMWare is going to be much less painful than attempting to learn rails on windows.

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
I have a few webservices that publish rss information to myself for this or that. One is a small rails app and the others are small rack apps. If you're not expecting a ton of traffic or you don't require much database space then heroku is the right option. Their lowest tier service is free and works just fine for personal websites/apps.

http://heroku.com/pricing#blossom-1

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
Yeah it also says in that article that deprecated code will be moved into a plugin so it won't mean 100% code breakage. It's also not going to be deprecated until rails 3.1 so you can get your feet wet with rails 3 and have some time to install a plugin or rewrite some of your models.

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
Rails 3.0 is not out, but the release notes have been written. They outline most of the changes we will see in 3.0, how they work, and why they were changed.

http://guides.rails.info/3_0_release_notes.html

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
Just chiming in. We use flot as well. I've come to the conclusion that if they're looking at my charts in IE6 then gently caress them. They're getting what they deserved.

Adbot
ADBOT LOVES YOU

Ghotli
Dec 31, 2005

what am art?
art am what?
what.
You could write a rails plugin and put it up on github. That or you could figure out and patch some of the bugs on the rails bug tracker. I know they're looking for help with that. You would look like a rails badass if you could say that you contributed to rails core.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply