LinRails — Ruby On Rails For Linux 201
foobarf00 writes "LinRails is a binary package that includes Ruby-1.8.6, Rubygems-0.9.4, Rails 1.2.3, Mongrel 1.0.1, MySQL-5.0.41, ncurses-5.6, OpenSSL-0.9.8e, and zlib-1.2.3. Its goal is to make it easy to get a Ruby on Rails development environment running in no time. This initial 0.1 release doesn't have a Web server in the package; opinions are solicited as to which to include."
Whats wrong with... (Score:2, Insightful)
...up2date?
:-P
monk.e.boy
Re: (Score:2)
Re: (Score:2)
maybe because APT isn't written in Python?
/ducks
Re: (Score:2)
You are comparing apples and oranges. Debian packages (.deb) are installed via dpkg, apt is 'just' a front-end which is responsible to get those packages from somewhere (CD-ROM, net,
Aptitude (Score:2, Interesting)
Re: (Score:2)
Seriously, aptitude and apt-get are probably the best installation methods I've seen (except for
Re:Aptitude (Score:5, Insightful)
Windows:
1)find
2)download
3)go through installation wizard
apt:
1)if you already know package, do apt-get install
or
1)search for a package with apt-cache, aptitude, or synaptic
2)install, again without installer
or
1)find a
2)download
3)install
I don't see how
Re:Aptitude (Score:4, Insightful)
Re: (Score:2)
The vast majority of stuff you need is already packaged and in the debian repos. There's rarely any need to build anything yourself, save when you need a newer version of package foo.
.exes are that you may get a new copy of libraries with each program you install, leading to bloat. The alternative is that the
The other problems with
Why .exe's are better (Score:2, Informative)
1) in my experience a Windows
2) if I'm given a link to a
Re: (Score:2)
What kind of Linux are you using? I would suggest getting yourself a copy of Ubuntu. You shouldn't have this problem unless you're using something like an old version of redhat/fedora.
Re: (Score:2, Informative)
Upon First Boot I immediately allowed Fedora to AutoUpdate, but then had trouble. Without a tutorial, I searched for and found software I wanted to install but I thought I had to compile from 'somepackage.tar.gz'. Oops. Seems silly to me now, but I didn't have anyone helping me. I knew I could go to forums, but didn't. I then found out about rpm
Re: (Score:2, Insightful)
dpkg-reconfigure debconf
and set the priority to low.
Anyway, packages are separated so if you just want the main package for example:
aptitude install ruby
If you want more then:
aptitude install ruby ruby-prof rubygems etc
maybe even better:
aptitude --with-recommends install ruby.
Re: (Score:2)
With Linux, you have to find the name of the program you want to download, search the repository for whatever name your distro uses, and then install it. Or you're using a graphical installer in which case it's pretty much one step, not even a wizard in most cases.
This is one area w
Re:Aptitude (Score:4, Informative)
Take a common program, for instance. Say, Gnumeric. And you're running Ubuntu 6.06 -- the Long Term Support release.
So you are running a release that is made for one purpose: To not change and then complain that it doesn't change? Okaydokey. The rest of us just follows the automatic Ubuntu upgrades as times go by. Sure, sometimes we have to wait for 6 months before getting the latest .x release, but personally, I really don't care.
It sounds as if you want a stable core, with application repositories closely tracking the newest available? Sounds like a decent idea for a distro. Are you sure that there isn't just such a distrobution?
I don't know about autopackage, but klik [atekon.de] seems to offer what you want. I'm sure the klik team will appreciate your contributions, at least with testing. They seem to need some server reasources, too, the search seems very slow.
Personally, I prefer to be able to have new, fairly tested software without having to bother with the actual upgrades. But I am sure you actually enjoy hunting down the 10-50 apps you use and upgrade them as needed every now and then ;p
Re:Aptitude (Score:4, Informative)
What if it's not "some random website"? What if you know that it's good software, but it isn't in any repository?
"Locate package foo. Download it, ensure dependencies are met"
Ensure that dependencies are met? Most people don't want to manually hunt down hundreds of dependencies.
"Alternatively download the source tarball and run
Try explaining that to your mother and your grandmother. You'll find out what's so hard about that.
However, the fact that some software are not in repositories is just as much of a political/social problem as a technical one. It already starts with the question: DEB or RPM? What if I want to produce DEB but I'm using an RPM distro? If I produce a DEB, will it work on all Debian-based distros? (Answer is no, unfortunately.) If I produce an RPM will it work on all RPM-based distro? (No either). What about non-DEB non-RPM distros? Etc. Making an installer on Linux would hide the package format problem, but will not solve binary compatibility problems (FooApp needs libfoo.so.4 but AwesomeLinux only provides libfoo.so.5).
Re: (Score:2)
Re: (Score:2)
Re: (Score:2, Insightful)
2/3) The difference would be that "apt-cache search" is running from the cached headers. That's equivalent to "yum -C search" - yes apt-cache is faster than yum normally because yum is downloading all the headers, unzipping the xml and combining before it does the search. I haven't ben
It does have a very good web server (Score:4, Informative)
>This initial 0.1 release doesn't have a Web server
Mongrel is a very good web server, especially for a development environment. (And the ruby package includes webbrick on top of that). Current 'best practice' deployments of RoR applications usually use a pack of Mongrels behind a load balancer (such as mod_proxy or Pound), and/or Apache or Nginx to serve static pages. If you want to completely mirror your production environment in your development/testing environment than including those would the logical choice.
Why not a metapackage? (Score:5, Insightful)
Even without such a metapackage, one can install this software with a single apt-get command line. Windows-based development methodology is bad enough, let's not infect linux/unix development with it.
Re: (Score:2)
And last I checked Debian didn't include Gems which is really annoying if you're learning Ruby and a book mentions a bunch of gems you should install.
Re: (Score:2)
http://packages.debian.org/stable/interpreters/ru
hear hear! (Score:2)
That is a v
Re: (Score:2)
I rather prefer a package (you know like this dumb doubleclick on windows) with absolutly everything you need to get started than the Linux way of installation. Each time I have to install a new stuff, it fails on the first run (except those which are part of the distribution)...And three hours of googling later it "may" install the program and it "may" run. You feel like you are wasting your time (especially if it is for your job).
Why?
I just spent a whole afternoon yesterday to install a popular pr
Quit staring at your belly button! (Score:2)
Calling for a monolithic package will do away with a lot of these advantages. Your probl
Re: (Score:2)
Is it still single-threaded? (Score:3, Interesting)
I can, on the other hand, highly recomm
Re: (Score:2)
Seriously.
Imagine the skymiles potential.
Why MySQL (Score:2, Offtopic)
This is really not meant to be a flame, but pgsql is really better than mysql, so why not include the better one? Or am I wrong?
Re: (Score:2, Funny)
See, you're not the only one that can spew garbage.
Re:Why MySQL (Score:4, Insightful)
Re: (Score:3, Insightful)
Though I'm looking to move off a web-host and build a server out of my house. Everyone keeps saying PostgreSQL is better. Why? For my average use, what benefits will it offer me?
If I throw some common PHP/SQL stuff on there, will it run faster (Gallery2, LotGD, phpbb3, etc)?
Re: (Score:3, Insightful)
Though I'm looking to move off a web-host and build a server out of my house. Everyone keeps saying PostgreSQL is better. Why? For my average use, what benefits will it offer me?
If I throw some common PHP/SQL stuff on there, will it run faster (Gallery2, LotGD, phpbb3, etc)?
I know that a lot of people here will kill me and say "but you can do this in mysql too!! (somehow)", but:
- Integrity: if i delete from people where id=1; all child tables of people (telephone numbers, addresses and whatnot) are kept. On top of that you are allowed to delete the parent if it has childs. I hate this default behavior.
- ACID
- Stored Procs: You may not use them, but one day you may will. Maybe you will have to insert rows in a table after an update on another, or implement some other things th
Re: (Score:2)
- ACID - InnoDB seems to provide that for me. I've never lost data on MySQL.
- Stored Procs - We use these at work on our insanely complex MSSQL setups that I loathe, but I don't know that I'll ever have use for them on my server, and I (perhaps mistakenly) assumed this was a standard SQL feature. MySQL doesn't support stored procs?
- Triggers - I'm not sure what these are.
I'll Google some PosgreSQL vs MySQL comparisons and benchmarks.
Re: (Score:2)
- Stored Procs - We use these at work on our insanely complex MSSQL setups that I loathe, but I don't know that I'll ever have use for them on my server, and I (perhaps mistakenly) assumed this was a standard SQL feature. MySQL doesn't support stored procs?
It does, but only really basic stuff.
- Triggers - I'm not sure what these are.
You can make a trigger on a table that triggers before or after a row is inserted/updated/deleted and runs a spc or a dml statement.
Re: (Score:2)
"Yes, PostgreSQL has MVCC, while InnoDB has to make do with row-level locking."
Er, no, InnoDB uses MVCC, as can be trivially verified by playing about with it. Start a transaction in 2 clients, update a table in client 1 and commit, then read those rows in client 2; note client 2 sees the version of the table prior to client 1's modifications because you've got a versioned snapshot.
You can modify this behavior by selecting a different isolation level [mysql.com].
Re: (Score:2)
Ok, on site (Score:3, Interesting)
The whole factory is run off of postgresql.
The financial system is run off of Oracle.
The timesheet system is run off of Sybase.
Guess the systems which gave the most and least problems.
The winner is PostgreSQL. Untouched for months, perhaps even years. Next we have Oracle which is a pain in the arse to manage but never failed. and last place came sybase which had to be touched, managed and/or restarted regularly[1].
In terms of transactions, the factory
Re: (Score:2)
Speed of common PHP webapps will depend on what they've been optimised for -- postgres runs all SQL fairly quickly; mysql runs things quickly if you spend extra time and effort making your queries mysql-friendly.
[1] An exampl
Re: (Score:2)
SELECT *
FROM images,
tags
WHERE images.id = tags.image_id AND
tag = 'a_tag'
no need to use a heavy IN clause, but maybe your real query was more complicated than that and you used it only as an example.
Re: (Score:2)
And for a web server, why not lighttpd?. Its vastly faster. Or IIS ... fastly vaster...
Re: (Score:2)
Re: (Score:2)
This is really not meant to be a flame, but pgsql is really better than mysql, so why not include the better one? Or am I wrong?
Why MySQL? But of course, so there's something to whine about.
If you used RoR you'll figure out all advanced features of a database are left unused, so why bother.
Re: (Score:3, Informative)
For most people's web development needs MySQL just does what you need. Chances are if you need something MySQL doesn't have then you're already competent enough to not need a package like this and set it all up yourself anyway, this just makes it easier for those
Re: (Score:3, Interesting)
Re: (Score:2)
Sure, nice little database. Not much for multiple users and large data tho...
> Rails can take care of all the data integrity for you anyway.
ah, no - applications do a horrible job of managing data constraints over time. That is, you might test the bajesus out of your code this version and next - but are unlikely to test how code with this version handles data created with the code ten versions before. None of the data we're talking a
Re: (Score:2)
Next time you don't want to flame, please provide reasons for people to assume you're not flaming. Just stating, as if a fact, that X is better than Y without any figures to back it up or explaination why you think that is, looks a lot like flaming.
Not saying that you are, but stating something as a fact without any evidence is either A) flaming or B) religion. Some people would go so far as to equate t
Re: (Score:2)
Re: (Score:2)
Sqlite is perfect to develop with until you have something usable. Then you can switch to Postgres (or MySQL or whatever) and run your tests to make sure everything works.
MySQL == windows (Score:2)
That said, it's ass-backwards. People should fix the bug --- that some software doesn't have a database abstraction la
Easy, but irrelevant (Score:2)
The idea of LinRails isn't to spread good database ideology. It's to get Ruby on Rails up and running as quickly as possible for the greatest number of users.
The whole thing is irrelevant, anyhow. Chances are if you want to make a Rails app, you already know what database server you'll
Fantastic (Score:5, Interesting)
After three months, the results have far exceeded my expectation. I'm very impressed with the maturity of music production apps for Linux and the performance has been as strong as I expected. I'm still a Linux noob, but the experience has been positively inspirational. In fact, it's been a lot like my first experiences with media production on my first Mac, where just about every day brought another new way to look at the work.
I'm not a programmer, but I'm learning Ruby and this new release gives me one more reason to sit down at the Linux box instead of my others.
Re: (Score:2)
Just run synaptic, find ruby on rails, and install. I think it will suggest mysql automatically. If not install that too.
You'd don't need anything more than that. Then just follow any ror tutorial on the web. It's pretty easy.
Apache? (Score:3, Interesting)
Some may argue that better alternatives exist (of which I'm not really aware) but since Apache is so popular and common place, wouldn't it seem the logical piece of this meta-package?
People who want specific packages for specific reasons are going to set up their own environment. For a pre-setup environment, shouldn't you shoot for the common setup?
Re: (Score:2, Interesting)
Agreed.
Apache is not only the most widely used web server, it is also the most supported one, of good quality, and offers countless possibilities alongside the purpose of your typical RR demo program, which is nice to have if you think like a biz.
Re:Apache? (Score:5, Informative)
Yes, I was stunned when I found this out last year. If one wants to run RoR on Apache, then one has to use either mod_fastcgi (or mod_fcgi or whatever it was called; it'd run RoR as a FastCGI process) or mod_ruby. mod_ruby seems to be abandoned, and I have heard stories about excessive memory usage. mod_f(ast)cgi doesn't seem to work on Apache 2 at all.
So there are two ways to run RoR: either in Lighttpd (which has proper FastCGI support) or in Mongrel (a web server which can run RoR directly).
Re: (Score:2, Informative)
# SetEnv RAILS_ENV development /home/Dark$ide/ruby/myapp/public/ /home/Dark$ide/ruby/myapp/log/apache.log
.cgi
/ruby /home/Dark$ide/ruby/myapp/public
.cgi
ServerName rails
DocumentRoot
ErrorLog
Options ExecCGI FollowSymLinks
AddHandler cgi-script
AllowOverride all
Order allow,deny
Allow from all
Alias
Options ExecCGI FollowSymLinks
AddHandler cgi-script
AllowOverride all
Order allow,deny
Allow from all
The .htaccess file in the public directory needs a quick tweak to match the Alias to get the rewrite rules working.
Works well.
Re: (Score:2)
The .htaccess file in the public directory needs a quick tweak to match the Alias to get the rewrite rules working. Works well.
Oops! You said "quick" and ".htaccess" in the same sentence. From Apache's own documentation [apache.org], .htaccess files are a last-ditch solution for when you don't control the server and can't edit its config files directly. Really, if you can help it, don't ever use them.
Oh, if you use some web application that comes with a bunch of .htaccess files that you don't want to manually merge into your httpd.conf (or included files), you can use the Include [apache.org] directive to pull them into you config file once rather th
Re: (Score:2)
Re: (Score:2)
The way most rails stacks are setup your webserver (I use apache for instance) gets a request.
The web server looks for the file on the disk, if it's there it sends it and that's the end.
If the file is not there, the server asks a load balancer (ModProxyBalancer, Pound, Nginx, even FastCGI*)
to send a request to one of a pool of persistent rails processes which can then handle it.
Now, if you serve up say, 5 images and 3 JS or CSS files on a page on a
Re: (Score:2)
While mod_ruby runs Ruby apps inside Apache, FastCGI doesn't. FastCGI is like CGI but keeps processes around so that they can handle requests more quickly.
"Now, if you serve up say, 5 images and 3 JS or CSS files on a page on average, that means that 5 out of 8 requests will use a bloated webserver process containing RoR, when in reality we need far fewer processes since only 1 in 8 requests actually ever touches ruby code. Less loaded and runnin
Re: (Score:2)
I would like to say for the record, that I didn't say that FastCGI ran apps inside apache, I don't know where you got that from.
Re: (Score:2)
Re: (Score:2)
By the way, great work on the blog, I like how comprehensive your posts are.
Re: (Score:2)
This is our preferred way of running PHP, too. Keeps the webserver nice and lean and isolated and stable. On the other hand, I think it would be tidier if PHP had something like mongre
Re: (Score:2)
I'm running several RoR sites using Apache2 with fast_cgi. So, doesn't run at all? Which distro? I'm using Ubuntu and it's been working -great-.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
You know, you could have asked on any forum instead.
Actually, "RoR cannot be run on Apache" is exactly what the people on the RoR mailing list and IRC told me. I asked them what's going on, they told me to stop wasting my time on FastCGI for Apache (which is abandoned, as they claimed) and that I should use Lighttpd instead.
Regardless of whether it can be done, it should be easy. If you have the time nitpicking about my post then wh
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Insightful)
Re: (Score:2)
Personally; I know the brand of webserver isn't supposed to matter to the webapp, but I'm not betting any money on it. I like my development environment to be as much like production as possible
Re: (Score:2)
It doesn't hurt either. Especially since you're supposed to use as close environment to production as possible. I run Apache on my winbox for dev and I'm perfectly happy with it (next step is moving to a linux box.. but not yet).
Re: (Score:2)
OK, you're colored stupid, champ.
Seriously, Mongrel is good for development; it's a good mix of fast and easy. Though why someone would need an *easy* package of something available as a RubyGem is still beyond me. If you can't run 'gem install rails -y' you'll never get a Rails app going.
Ask Slashdot? (Score:2)
All it would have taken was editing a word or two of the submitted story to make the implicit question more direct and, voila, there's the article...
Show me one site.... (Score:2, Interesting)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
This is my main gripe with RoR: It's boasted into the stratosphere by zealots, but hasn't proven itself in The Real World at all...
Err... In case it wasn't common knowledge, 37signals is largely responsible for the development of Ruby on Rails. As such, I'm pretty sure it powers all of their apps, like Ta-da List, Basecamp, and Highrise. I think Highrise is pretty new, but Basecamp has been around for a while, and I think it qualifies as proven [basecamphq.com].
It's hard to believe you "get around on the Web 2.0" and yet haven't heard of 37signals or any of their products; perhaps you just don't remember hearing of them. Jason Fried, the founder (a
Re: (Score:2)
Twitter is on the scale of Slashdot, as you can see on Alexa. [alexa.com]. You can read about how their site is built [twitter.com] and why people expecting to scale are using RoR [ttono.us].
As far as perl or PHP goes, I'm sure Ruby on Rails is about the same to scale. I think all of them have the problem that they're database-centric, so
Re: (Score:2)
Sorry, but that's wrong. Have you considered trying, say, math?
Suppose we're talking a 4-developer, 20-server project, which strikes me as typical for something like Twitter. Those developers will have a loaded cost of $600k per year. The servers will be circa 50k to purchase and the same to run for their two-year lifespan. Total two-ye
Re: (Score:2)
I should have known better than to listen to an AC. As a Prevayler fan, I think Mnesia's neat, but they make pretty clear that Mnesia isn't good for large amounts of data. And given that Twitter's well north of 50 million messages and growing absurdly, it's well outside of Mnesia's envelope. Sure, you could build something federated, but you could do that nicely with all sorts of things, including Ruby.
Mongrel is a web server (Score:3, Interesting)
Mongrel is a web server, hence this package includes a web server (unless it doesn't actually contain Mongrel, despite what the writeup says). Also, Ruby 1.8.6 comes with WEBrick, which is a the web server Rails uses by default...
Anyway isn't a simplified Rails installer for Linux kind of redundant? Most newer Linux distros I've seen already have a native package that installs Ruby on Rails and all its dependencies. Most people will probably find the Instant Rails [rubyforge.org] package a lot more useful, since it does the same for Windows.
Special Announcement (Score:5, Funny)
After months of hard work I finally bring Debian/Ubuntu/Xandros/[derivativus infinitum] users a computer program that will not only download the latest RoR development packages for you, it will also notify you of new versions when they become available later.
Moreso, all the packages I provide are registered in a special database so that should you choose to remove the below packages, you can do so with ease using a GUI button or the command line!
Please download the following code into your computer terminal and compile it by hitting ENTER (one-key compile for convenience).
sudo apt-get update ; sudo apt-get install rails ruby rubygems libruby1.8-extras mysql libncurses-ruby openssl libzlib-ruby
The above program is licensed under the "Why Make It Harder Than It Needs 2B License". Please use this link [debian.org] to make a donation to my project.
Re:Special Announcement (Score:4, Informative)
"We decided to this so that we can share the same development environment with all the team. If programmers have a different Linux distro/version, they will still share the same development environment. This prevents programmers to say "well, it works on mine" when there is a problem. Also if you have a Linux distro package, versions may change when a new Linux distro is released. Also if you want to upgrade to the latest and greatest you are at the mercy of the Linux distribution. We will try to always have the latest versions of each tool. This helps to solve those problems."
Re: (Score:2)
I had to get three xen debian instances up and running with Mongrel and RoR a few months ago, and the only bigger headache I've ever encountered was getting trac running with svn. The number of dependencies that kept cropping up was just unbelievable. I spent about four hours working it through on the first instance. Thank god for xensource "clone server".
Not really necessary (Score:2)
A bit off topic, but useful advice: I set up editor projects (TextMate, gedit, etc.) for:
1.
2.
W
Zope (Score:2)
Also be sure to check out Plone [plone.org], Symfony [symfony-project.com], Django [djangoproject.com], CakePHP [cakephp.org], Prado [pradosoft.com] and Turbogears [turbogears.com] before you blindly join the overhyped Rails bandwagon.
Re: (Score:2, Insightful)
Cake, Symfony -- stay the hell away from these crummy frameworks.
And sure Rails may be overhyped, but that doesn't mean that it's bad.
What's your problem with Cake and/or Symfony? (Score:2)
Care to elaborate? I'd like an educated opinion, why you think these aren't worth it. Do you have real experience with them or did you just dick around with each for 20 minutes? Or is it PHP that you don't like? I'm really interested. Propels XML is the only potential downside I can see. And that doesn't seen to much of a problem.
Re: (Score:2, Interesting)
Care to elaborate? I'd like an educated opinion, why you think these aren't worth it. Do you have real experience with them or did you just dick around with each for 20 minutes?
I did say that based on a quick hour-or-less session I did with several PHP frameworks. I checked out Symfony, Cake, Qcodo, Zend framework, and I may have taken a cursory look at a couple other. After evaluating those last summer (about a year ago exactly) I ended up using the Zend framework for that project.
Both Symfony and Cake seemed nice at first, but I couldn't even follow their 101 tutorials because the instructions were not correct for the current stable versions. Sure I could have figured it out,
It's already easy (Score:2)
It's a one-liner apt-get, and then let "gem" to the rest for you (kind of like apt-get/cpan for Ruby packages).
Seems like a slight non-story to me.
-dale
Trademark dispute (Score:2)
"Do the Lin---ls rock!"
See this blast from the past [linspire.com].
Symptomatic of RoR (Score:2)
RoR in general is weird like this -- yes, you might be able to "create a blogging application in 2 minutes" by calling some appropriate code-generation wizards, but does that really make you a developer who is able to actually do something on his own outside the scope of what is provided o
Re: (Score:2)
Re: (Score:2)
Good application architecture is independent of language, but the common commercial j2ee platforms automate the creations of layers of bloat that needs expensive hardware and large numbers of servers to power. And the latest craze with SOA just puts middleware on your middleware, more bloat and even more serve
Re: (Score:2)