Closed ghost closed 11 years ago
This sounds more like a bundler/rubygems/(rvm|rbenv) issue than a therubyracer issue. therubyracer needs the ref gem to be installed and active, but it is not responsible for installing it and loading it.
Charles, Do you mention this required gem dependency in your documentation?
Paul
This sounds more like a bundler/rubygems/(rvm|rbenv) issue than a therubyracer issue. therubyracer needs the ref gem to be installed and active, but it is not responsible for installing it and loading it.
— Reply to this email directly or view it on GitHub.
It is not standard practice to enumerate all gem dependencies in the README, but it is in the gemspec so that tools like rubygems can present this information to you. For example http://rubygems.org/gems/therubyracer
However, It feels as though you have actually triggered a bug or some other edge case in one of the tools mentioned.
Hello @pseverini,
Do you think it is necessary to list the gem dependencies in the documentation when dependency management is something bundler
and rubygems
do with no user intervention, based on the contents of the gemspec
file?
P.S. You might like to edit out your personal information from the comment above -- spam and stuff.
Thanks for the info about the private information.
If I were handing over a product specification to someone then they would probably expect me to indicate all the dependencies for that product. I would not expect someone to have to go searching for the dependency information outside of the product specification. Is the 'ref' gem included in the base framework? I would certainly want the end user to be informed.
In order to discover dependencies from within a project, you can use the gem dependency
command
~/P/therubyracer ❯❯❯ gem dependency therubyracer ⏎
Gem therubyracer-0.10.2
libv8 (~> 3.3.10)
rake (>= 0, development)
rake-compiler (>= 0, development)
rspec (~> 2.0, development)
Gem therubyracer-0.11.1
libv8 (~> 3.11.8.7)
ref (>= 0)
Gem therubyracer-0.11.3
libv8 (~> 3.11.8.12)
ref (>= 0)
Gem therubyracer-0.11.4
libv8 (~> 3.11.8.12)
ref (>= 0)
Or the bundle show
command if you are using bundler:
~/P/therubyracer ❯❯❯ bundle show
Gems included by the bundle:
* bundler (1.3.4)
* diff-lcs (1.1.3)
* gem-compiler (0.1.1)
* libv8 (3.11.8.17)
* rake (10.0.3)
* rake-compiler (0.8.1)
* redjs (0.6.2 0d844f0)
* ref (1.0.2)
* rspec (2.12.0)
* rspec-core (2.12.2)
* rspec-expectations (2.12.1)
* rspec-mocks (2.12.1)
* therubyracer (0.11.4 97767ab)
In order to familiarize yourself with how rubygems work, I would suggest starting with the RubyGems Guides. They are an excellent resource.
You bring up an interesting point and I would like to hear your final opinion on it. We all know about the tools and commands that allow you to retrieve the Gem dependency information. I have experience using the tools you mentioned above. Thanks for the info. Do you still believe that the dependency information should not be published in the product documentation in some way. I really don't understand why this information is not visible after you click on the link for "Documentation". Should I count on the RubyGems.org web site entry point to get that information? What if I pull your source code directly from the GIT repository? I see that other Gem authors have done an extensive job of documenting their products, but I still wonder why their product documentation does not reflect the dependency information in the documentation source.
Is it really necessary to document something, when it follows strictly an already documented convention?
In the Ruby world convention over configuration is sought and highly valued. It implies specifying only the unconventional aspects of the system. In our case the dependencies (as the convention dictates) are specified in therubyracer.gemspec
.
I just installed the 'therubyracer' gem and I'm getting the following issue when I try to run rails on Mac OSX 10.8.2. I installed the bundle several times with no problem. I only see this issue when I try to run rails no matter what environment. Does anyone know how to resolve this issue without uninstalling 'therubyracer' gem? I'm only including the gem reference so that I have it for my production environment.
Issue: macdev01:sampleapp pseverini$ rails s Could not find ref-1.0.3 in any of the sources
Dependency Check: Run
bundle install
to install missing gems. macdev01:sampleapp pseverini$ sudo gem uninstall ref You have requested to uninstall the gem: ref-1.0.3therubyracer-0.11.4 depends on ref (>= 0) If you remove this gem, these dependencies will not be met.
Gemfile: gem 'sqlite3'
Gems used only for assets and not required
in production environments by default.
group :development, :test do gem "rspec" gem "rspec-rails", ">= 2.0.0.beta.17" gem "autotest" gem "autotest-rails" gem "webrat" end
needed if no Javascript runtime is available in production environment
group :production do gem "ref", "~> 1.0.3" gem "therubyracer", :require => 'v8' end
group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' gem 'jquery-rails' gem 'uglifier' end
Bundle List: macdev01:sampleapp pseverini$ sudo bundle install Using rake (10.0.3) Using ZenTest (4.9.0) Using i18n (0.6.1) Using multi_json (1.7.1) Using activesupport (3.2.13) Using builder (3.0.4) Using activemodel (3.2.13) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.5) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.1) Using tilt (1.3.6) Using sprockets (2.2.2) Using actionpack (3.2.13) Using mime-types (1.21) Using polyglot (0.3.3) Using treetop (1.4.12) Using mail (2.5.3) Using actionmailer (3.2.13) Using arel (3.0.2) Using tzinfo (0.3.37) Using activerecord (3.2.13) Using activeresource (3.2.13) Using autotest (4.4.6) Using autotest-rails (4.1.2) Using coffee-script-source (1.6.2) Using execjs (1.4.0) Using coffee-script (2.2.0) Using rack-ssl (1.3.3) Using json (1.7.7) Using rdoc (3.12.2) Using thor (0.17.0) Using railties (3.2.13) Using coffee-rails (3.2.2) Using diff-lcs (1.2.1) Using jquery-rails (2.2.1) Using libv8 (3.11.8.13) Using nokogiri (1.5.8) Using bundler (1.3.4) Using rails (3.2.13) Using ref (1.0.3) Using rspec-core (2.13.1) Using rspec-expectations (2.13.0) Using rspec-mocks (2.13.0) Using rspec (2.13.0) Using rspec-rails (2.13.0) Using sass (3.2.7) Using sass-rails (3.2.6) Using sqlite3 (1.3.7) Using therubyracer (0.11.4) Using uglifier (1.3.0) Using webrat (0.7.3) Your bundle is complete!