BARRIER - require "rubygems"

ruby 1.9.2p180 Windows 7

Rubygems is included in ruby 1.9.

Because it's included, I expect that it will work out-of-the-box,
without the need to use

ruby -rubygems myscript.rb

and especially not

require "rubygems"

within *.rb files

···

-

The default-library-system which is included in the language, should
be *enabled* by default, thus a user can simply click on the files and
they start correctly, without the (logically false) need to have
"require librarysystem" within the files.

What step do I have to take, in order to activate rubygems as the
default library system (thus I can start .rb files without having to
require rubygems)?

.

--
http://lazaridis.com

Or you could try using the well documented RUBYOPT shell variable to
set the value RUBYOPT=rubygems

The only barrier here is that you didn't read the rubygems user guide
which is available on the internet. It even explains how to do this on
windows if you should be do hampered.

···

On 9 June 2011 20:15, Ilias Lazaridis <ilias@lazaridis.com> wrote:

Because it's included, I expect that it will work out-of-the-box,
The default-library-system which is included in the language, should
be *enabled* by default, thus a user can simply click on the files and
they start correctly, without the (logically false) need to have
"require librarysystem" within the files.

C:\Users\walton.hoops\repos>ruby --version
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

C:\Users\walton.hoops\repos>irb
irb(main):001:0> require 'sinatra'
=> true
irb(main):002:0>

Works for me. Does it not for you? If not can you give us some more
information, such as a simple demo that reproduces the issue?

···

On 6/9/2011 1:15 PM, Ilias Lazaridis wrote:

ruby 1.9.2p180 Windows 7

Rubygems is included in ruby 1.9.

Because it's included, I expect that it will work out-of-the-box,
without the need to use

ruby -rubygems myscript.rb

and especially not

require "rubygems"

within *.rb files

-

[...]

please note that several messages which appear on ruby-talk

http://www.ruby-forum.com/topic/1893359

Posted by Jon Forums (jonm) on 2011-06-09 23:34
Posted by Jon Forums (jonm) on 2011-06-11 20:36
Posted by Chad Perrin (Guest) on 2011-06-11 21:40
Posted by Aaron Patterson (Guest) on 2011-06-12 23:03

did not arrive within comp.lang.ruby.

http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/5cdb05f06f4888ba#

This does not mean necessarily that I ignore you.

I just post & reply only via usenet.

.

···

--
http://lazaridis.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> ruby 1.9.2p180 Windows 7

> Rubygems is included in ruby 1.9.

> Because it's included, I expect that it will work out-of-the-box,
> without the need to use

> ruby -rubygems myscript.rb

> and especially not

> require "rubygems"

> within *.rb files

> -

C:\Users\walton.hoops\repos>ruby --version
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

same version here.

C:\Users\walton.hoops\repos>irb
irb(main):001:0> require 'sinatra'
=> true
irb(main):002:0>

Works for me.
Does it not for you?

It works.

And in my file, I've removed "require 'rubygems' " now, and it works,
too (to my surprise).

But I'm sure it did not. After I installed via the "one-click-
installer", I had to use "require 'rubygems' " in order to make it
work.

I've now uninstalled everything including the gems, and reinstalled:

It works again.

I can't recreate it on this machine anymore.

If not can you give us some more
information, such as a simple demo that reproduces the issue?

It was really not much more than:

require 'rubygems' #add this, thus files can be started with double-
click on windows-explorer
require 'sinatra'
require 'json'

#some code to test rest & json

.

···

On 9 Ιούν, 22:35, Walton Hoops <m...@waltonhoops.com> wrote:

On 6/9/2011 1:15 PM, Ilias Lazaridis wrote:

--
http://lazaridis.com

> C:\Users\walton.hoops\repos>ruby --version
> ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

same version here.

> C:\Users\walton.hoops\repos>irb
> irb(main):001:0> require 'sinatra'
> => true
> irb(main):002:0>

> Works for me.
> Does it not for you?

It works.

And in my file, I've removed "require 'rubygems' " now, and it works,
too (to my surprise).

But I'm sure it did not. After I installed via the "one-click-
installer", I had to use "require 'rubygems' " in order to make it
work.

There is no such thing as One-Click Installer, is RubyInstaller

Ruby 1.9.1 and 1.9.2 remove the need for require "rubygems"

If you can't replicate it, then it didn't happen.

I've now uninstalled everything including the gems, and reinstalled:

It works again.

I can't recreate it on this machine anymore.

Has nothing to do with your machine, it works since long time ago, we
worked really hard to ensure that was for everybody.

> If not can you give us some more
> information, such as a simple demo that reproduces the issue?

It was really not much more than:

require 'rubygems' #add this, thus files can be started with double-
click on windows-explorer

Please note that you mentioned "One-Click Installer" but also
mentioned 1.9.2

RubyInstaller do not associate with .rb and .rbw files by default, you
need to check these options.

If you had a previous "One-Click Installer" (1.8.6 or older) and that
was associated with .rb files, that could explain why you needed
require "rubygems".

···

On Jun 10, 11:40 am, Ilias Lazaridis <il...@lazaridis.com> wrote:

--
Luis Lavena

> > C:\Users\walton.hoops\repos>ruby --version
> > ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

> same version here.

> > C:\Users\walton.hoops\repos>irb
> > irb(main):001:0> require 'sinatra'
> > => true
> > irb(main):002:0>

> > Works for me.
> > Does it not for you?

> It works.

> And in my file, I've removed "require 'rubygems' " now, and it works,
> too (to my surprise).

> But I'm sure it did not. After I installed via the "one-click-
> installer", I had to use "require 'rubygems' " in order to make it
> work.

There is no such thing as One-Click Installer, is RubyInstaller

Confirmed, RubyInstaller

Ruby 1.9.1 and 1.9.2 remove the need for require "rubygems"

ok

If you can't replicate it, then it didn't happen.

It happened, just don't know the cause.

> I've now uninstalled everything including the gems, and reinstalled:

> It works again.

> I can't recreate it on this machine anymore.

Has nothing to do with your machine, it works since long time ago, we
worked really hard to ensure that was for everybody.

ok

> > If not can you give us some more
> > information, such as a simple demo that reproduces the issue?

> It was really not much more than:

> require 'rubygems' #add this, thus files can be started with double-
> click on windows-explorer

Please note that you mentioned "One-Click Installer" but also
mentioned 1.9.2

RubyInstaller do not associate with .rb and .rbw files by default, you
need to check these options.

I see, possibly this should be enabled by default (a knowledgeable
user will take action and disable if he needs so)

If you had a previous "One-Click Installer" (1.8.6 or older) and that
was associated with .rb files, that could explain why you needed
require "rubygems".

There is a possibility that this was the case.

One other possible influence could be the Kommodo IDE.

Anyway, if you say that this is a solved issue, than I consider it
closed.

btw:

Thank you for this RubyInstaller, makes things very easy.

.

···

On 10 Ιούν, 19:33, Luis Lavena <luislav...@gmail.com> wrote:

On Jun 10, 11:40 am, Ilias Lazaridis <il...@lazaridis.com> wrote:

--
http://lazaridis.com

That would be my guess as well. If you installed 1.8.6 from the (now
discontinued) one click installer, and later installed 1.9.2 via Ruby
Installer, by default it didn't associate the *.rb files with the new
installation, so when you ran from the command line you were using 1.9.2
as intended, but double clicking the file ran it on 1.8.6.

···

On 6/10/2011 10:35 AM, Luis Lavena wrote:

Please note that you mentioned "One-Click Installer" but also
mentioned 1.9.2

RubyInstaller do not associate with .rb and .rbw files by default, you
need to check these options.

If you had a previous "One-Click Installer" (1.8.6 or older) and that
was associated with .rb files, that could explain why you needed
require "rubygems".

Defaults like file associations and editors are very subjective.

This is how RubyInstaller stand about that:

http://groups.google.com/group/rubyinstaller/msg/34dd829ebe0e4567

Want it different, build your installer and name it IlliasInstaller.

Something more constructive than that is what RailsInstaller project
did.

···

On Jun 10, 1:05 pm, Ilias Lazaridis <il...@lazaridis.com> wrote:

I see, possibly this should be enabled by default (a knowledgeable
user will take action and disable if he needs so)

--
Luis Lavena

[...] - (expanding issue, getting personal)

No need to get personal or to extend the issue, it's very simple:

The fundamental user expectation is that it works out-of-the-box,
without any intervention.

And this is the major requirement to an installer.

Usually there is a choice, something like:

Default Installation
Custom Installation

"Default Installation" does not mean "I don't touch anything".

It means "I take the necessary actions to make the product running on
this machine".

If a user wants to have more control over the installation, he selects
"Custom installation".

.

···

On 11 Ιούν, 06:35, Luis Lavena <luislav...@gmail.com> wrote:

On Jun 10, 1:05 pm, Ilias Lazaridis <il...@lazaridis.com> wrote:

> I see, possibly this should be enabled by default (a knowledgeable
> user will take action and disable if he needs so)

Defaults like file associations and editors are very subjective.

--
http://lazaridis.com

(...) (some babbling about getting personal)

The fundamental user expectation is that it works out-of-the-box,
without any intervention.

Oh, you mean magical, like an automated install? Or probably you mean
unattended installation, that is when there is no user intervention.

The fundamentals are: when I install something, I don't want it mess
with my existing stuff.

If you actually install stuff on Windows, you will know how counter
productive is when you install something to try out and it changes all
your defaults.

Usually there is a choice, something like:
(...) (babbling and giving unsolicited advice on UX and installers)

What this does is hide the actions in two obscure items that newcomers
will not know what it means. Default installation doesn't say
anything, Neither does custom.

Right now the installers show in one single screen all your options,
which if users actually READ will be able to get what they want from
the installation.

···

On Jun 11, 7:06 am, Ilias Lazaridis <il...@lazaridis.com> wrote:

--
Luis Lavena

[...] - (ha! )

You have to increase your precision in order to mimic my writing
style.

Back to topic: please ask some product manager that you trust about
the basic installer requirement that I've mentioned (it's not my
requirement, but a general one).

.

···

On 11 Ιούν, 17:40, Luis Lavena <luislav...@gmail.com> wrote:

--
http://lazaridis.com

Maybe if you took the time out of being a thoroughly abrasive individual, you would have actually read the rubyinstall web page and found the link to request a bug/feature. Developers are not at your beck and call.

···

On 11/06/2011 17:30, Ilias Lazaridis wrote:

On 11 Ιούν, 17:40, Luis Lavena<luislav...@gmail.com> wrote:
[...] - (ha! )

You have to increase your precision in order to mimic my writing
style.

Back to topic: please ask some product manager that you trust about
the basic installer requirement that I've mentioned (it's not my
requirement, but a general one).

Here is a quote from Microsoft's UX design guidelines:
"Don't force users to opt out of installing optional features. Allow
them to opt in instead. For example, users should explicitly choose to
install a Windows Desktop Gadget."

Source: Microsoft Learn: Build skills that open doors in your career

···

2011/6/11 Ilias Lazaridis <ilias@lazaridis.com>:

Back to topic: please ask some product manager that you trust about
the basic installer requirement that I've mentioned (it's not my
requirement, but a general one).

--
Phillip Gawlowski

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
-- Leibnitz

"Another reason to streamline setup is that inexperienced users
sometimes overanalyze options, fearing that a wrong choice could be
irreversible or destructive. Forcing users to make decisions about
things they don't understand or care about can make them feel anxious,
incompetent, and even frustrated. Not a good first impression. It is
better just to get them going quickly, feeling comfortable and
confident as they explore the features in your program, and making
better decisions about feature options at that time."

Standard Setup, Custom Setup, that is adding too much noise. Also, an
standard setup should not alter the user environment.

RubyInstaller provides an access to the command prompt, "Start Command
Prompt with Ruby", which is located inside the Program menu, the place
newcomers will check as soon the installed something.

If you're savvy enough to attempt to use the default command prompt
that means you know about "Add Ruby to your PATH" option, which you
should have checked.

"Scope pages (typical, custom, or minimum)

Prefer to eliminate this page. Assume that most users want the typical
setup experience (and design that experience so that it works well for
most users)."

···

On Jun 11, 1:29 pm, Ilias Lazaridis <il...@lazaridis.com> wrote:

Back to topic: please ask some product manager that you trust about
the basic installer requirement that I've mentioned (it's not my
requirement, but a general one).

---

Anyhow, seem your level of expertise in fields from OO, embedded
system, consulting, UX and UI is so huge, perhaps you can support your
words with code.

Yeah, code, that thing that make things work.

Here is RubyInstaller repository:

Bet you something: if you contribute "something" instead of continuous
non-constructive criticism, I'll happily apply to the project. After
all, we all will benefit.

To the above statement you will argue that you have nothing to prove
me, which will result in prove my point: your complete lack of
technical skills.

So, I challenge you for once and for all *do* something instead of
flood with criticism. Change start on you.

Until then, bye.

--
Luis Lavena

This subjects "optional features".

The basic requirement I've mentioned subjects "necessary setup actions
to make product operative".

.

http://lazaridis.com

···

On 11 Ιούν, 20:30, Phillip Gawlowski <cmdjackr...@googlemail.com> wrote:

2011/6/11 Ilias Lazaridis <il...@lazaridis.com>:

> Back to topic: please ask some product manager that you trust about
> the basic installer requirement that I've mentioned (it's not my
> requirement, but a general one).

Here is a quote from Microsoft's UX design guidelines:
"Don't force users to opt out of installing optional features. Allow
them to opt in instead. For example, users should explicitly choose to
install a Windows Desktop Gadget."

Source:http://msdn.microsoft.com/en-us/library/ee915058.aspx

I hope you feel better now.

.

···

On 11 Ιούν, 20:15, Matt Harrison <iwasinnamuk...@genestate.com> wrote:

On 11/06/2011 17:30, Ilias Lazaridis wrote:

> On 11 Éïýí, 17:40, Luis Lavena<luislav...@gmail.com> wrote:
> [...] - (ha! )

> You have to increase your precision in order to mimic my writing
> style.

> Back to topic: please ask some product manager that you trust about
> the basic installer requirement that I've mentioned (it's not my
> requirement, but a general one).

Maybe if you took the time out of being a thoroughly abrasive
individual, you would have actually read the rubyinstall web page and
found the link to request a bug/feature. Developers are not at your beck
and call.

--
http://lazaridis.com

> Back to topic: please ask some product manager that you trust about
> the basic installer requirement that I've mentioned (it's not my
> requirement, but a general one).

Microsoft Learn: Build skills that open doors in your career

"Another reason to streamline setup is that inexperienced users

[...]

This just confirms: leave the boxes checked, or get rid of them (maybe
detect if there are already associations or path variables, and
confront the user only then).

Anyhow, seem your level of expertise in fields from OO, embedded

[...]

What you call "criticism" is basically detecting issues like
weaknesses, flaws, barriers, inconsistencies, defects.

This is my main expertise, or an inborn talent and tendency (or even a
"curse").

If spotting the issues leads to change, then this is a constructive
criticism, a contribution.

If I make additionally implementation / architectural suggestions,
then it's design work.

If there is much change-resistance (e.g. from the typical "freak-
show", the self-declared "community police" or simply by one crazy-
gone individual who writes publicly when he's under drugs), then it
becomes hard work.

Each issue needs an (estimated) average of 2 days mental attention
until it is solved in the language repository (where it benefits all).

Saying that this is no contribution at all is simply ungrateful and
insincere.

Here is RubyInstaller repository:
GitHub - oneclick/rubyinstaller: RubyInstaller for Windows - Build recipes

I don't have to prove my technical skills. The people that I'm
interested in, detect my abilities just from my writings - they don't
need to see a line of code.

But I'll reach code-level "naturally".

I'll most possibly try the DevKit when I reach C-level. I'll report as
usual issues that I spot and most possibly I'll send some code-level
changes via the usual channels.

.

···

On 12 Ιούν, 19:39, Luis Lavena <luislav...@gmail.com> wrote:

On Jun 11, 1:29 pm, Ilias Lazaridis <il...@lazaridis.com> wrote:

--
http://lazaridis.com

So, the RubyInstaller doesn't actually install Ruby and its
dependencies? That's *all* that a setup package is required to do.
File association and path changing are very much optional, since Ruby
will work without those.

···

2011/6/11 Ilias Lazaridis <ilias@lazaridis.com>:

This subjects "optional features".

The basic requirement I've mentioned subjects "necessary setup actions
to make product operative".

--
Phillip Gawlowski

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
-- Leibnitz

Ruby is operative without file associations to .rb/.rbw files. While
setting file associations is a sensible default for lots of software,
the usual use case of RubyInstaller is such that it is not clearly one
of the cases where file associations by default make sense; so the
safer choice is to minimize disruption by not setting them.

···

2011/6/11 Ilias Lazaridis <ilias@lazaridis.com>:

On 11 Ιούν, 20:30, Phillip Gawlowski <cmdjackr...@googlemail.com> > wrote:

The basic requirement I've mentioned subjects "necessary setup actions
to make product operative".