You are not logged in.
I have not the faintest clue how Ruby and gems work. I'm just trying to compile some software.
The following fails:
require 'rake'
require 'rubygems'
require 'builder'
Complaining that it can't find a file for builder. This is on a fresh install of ruby (1.9.1). What's wrong?
Thanks.
Offline
You need to install the builder gem first:
gem install builder
For more info on using the gem command:
gem help
Since you're using Ruby 1.9 you can also skip the "require 'rubygems'" line, it's no longer required.
Offline
Ah perfect. Thanks.
(Ruby is really weird.)
Offline
Ruby is really weird.
How so? Gems are just a means of easily packaging/distributing libraries and plugins.
Offline
Well I don't know Ruby at all, so this is just a bunch of things that seem "weird" to me:
- Rake. Why a build system for a scripting language? What's wrong with make/configure/CMake, etc? I guess my gripe here is the fact that I'm trying to compile a Chromium extension, written in javascript, but somehow with a build system in Ruby.
- The fact that it does something at the level with stuff like Rakefiles. It's a general-purpose script, not a specialized utility like make. Make establishes its purpose when people see "makefile" and go "oh I should type make to build this". Is Ruby trying to do this? If it is, why is it a generic scripting language at all? If not, why do this at all?
- Gems are too integrated into Ruby. It'd be a lot nicer if gems (and extensions/plugins) were simply based on how files were placed in the lib directory, and let my package manager worry about what is and how it is distributed. (Like how Python is done on Arch - setuptools is not essential to the operation of things.) And for "gem install builder", why did it not require root access? If it didn't modify a system-file, did it cache something in my local directory or a tmp/var directory? Is that really the right way of doing things? E.g. security concerns.
- It's interpreted, yet the functionality it provides seems low-level enough (compared to PHP anyway) that it should at least have compiled versions. But this isn't really weird I guess, it's more of what Ruby is meant for and I'm not into it enough to appreciate it.
- Trying to get it working on a server?! Holy crap @ the amount of setup and configuration.
But yeah. One thing I'm thankful for is how much popularity Git has gained with Ruby's usage of it.
Offline
Well I don't know Ruby at all, so this is just a bunch of things that seem "weird" to me:
- Rake. Why a build system for a scripting language? What's wrong with make/configure/CMake, etc? I guess my gripe here is the fact that I'm trying to compile a Chromium extension, written in javascript, but somehow with a build system in Ruby.
- The fact that it does something at the level with stuff like Rakefiles. It's a general-purpose script, not a specialized utility like make. Make establishes its purpose when people see "makefile" and go "oh I should type make to build this". Is Ruby trying to do this? If it is, why is it a generic scripting language at all? If not, why do this at all?
- Gems are too integrated into Ruby. It'd be a lot nicer if gems (and extensions/plugins) were simply based on how files were placed in the lib directory, and let my package manager worry about what is and how it is distributed. (Like how Python is done on Arch - setuptools is not essential to the operation of things.) And for "gem install builder", why did it not require root access? If it didn't modify a system-file, did it cache something in my local directory or a tmp/var directory? Is that really the right way of doing things? E.g. security concerns.
- It's interpreted, yet the functionality it provides seems low-level enough (compared to PHP anyway) that it should at least have compiled versions. But this isn't really weird I guess, it's more of what Ruby is meant for and I'm not into it enough to appreciate it.
- Trying to get it working on a server?! Holy crap @ the amount of setup and configuration.
But yeah. One thing I'm thankful for is how much popularity Git has gained with Ruby's usage of it.
1) Ruby is not just a scripting language. It can be used for anything just like for example Python and Perl can, but that does not always make it the best tool for the job.
2) Rakefiles are just a means of automating tedious tasks. For example, you could have a rake task for running all your unit tests. Or for re-generating the documentation of your project. You get the idea, anything is possible.
3) When you install gems as a normal user, they will be installed under ~/.gems. I'm not sure what the concern is here.
4) I'm not sure if I understand what you mean here but anyway: Ruby cannot be compiled. What you are talking about are probably C extensions. It's really easy to integrate a piece of C into Ruby as a library, partly due to the fact Ruby itself is written in C.
5) Are you talking about Rails? Personally I think Rails deployment has become a total breeze with the introduction of Passenger etc.
Offline