My favorites | Sign in
Logo
          
New issue | Search
for
| Advanced search | Search tips
Issue 381: Fix documentation for setting up the application
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  igal.koshevoy
Closed:  Mar 2009
Cc:  reidab, jdcohenesq, spinnerin
Type-Defect
Priority-Critical
Component-docs


Sign in to add a comment
 
Reported by igal.koshevoy, Feb 22, 2009
What steps will reproduce the problem?
1. Try to follow instructions in DevelopmentSoftware page

What is the expected output? What do you see instead?
These should produce a working instance of the app. FAIL.

With the changes made to the dependencies, it's impossible to follow the
instructions and get a working instance. 

We really need to fix the documentation because we spend tons of time
talking people through how to install screwy things like
has_many_polymorphs and such.
Comment 1 by igal.koshevoy, Feb 22, 2009
(No comment was entered for this change.)
Summary: Fix documentation for setting up the application
Comment 2 by igal.koshevoy, Mar 04, 2009
Joe, Reid and Audrey:

Can you confirm that my fix for this works? I've committed it to the
calagator/calagator repository because I'm fairly sure it won't break anything, and
feel that the resulting code just needs a sanity check on your computers.

If my fix works correctly, you should be able to remove some of the dependencies
(e.g., uninstall has_many_polymorphs), and then run "rake gems:install" (sudo
optional) and it'll complain a bit but ultimately install the missing dependencies. 

If you're running this under UNIX, running the command without sudo will install the
gems into your personal ~/.gems directory, whereas with sudo will install into the
system-wide gems directory. Both will be found by your Rails application, but it's
important to know which one you installed into if you're uninstalling the gem to test
whether the "gems:install" task worked.

-igal
Status: PatchSubmitted
Owner: igal.koshevoy
Cc: reidab jdcohenesq spinnerin
Comment 3 by reidab, Mar 04, 2009
It's working for me.
Comment 4 by igal.koshevoy, Mar 05, 2009
From an email by Joe Cohen:

Rake data:fetch fails
I ran into one more problem doing my Windows install from scratch -- I
couldn't do a data fetch.  Otherwise (Once I've individually installed
the missing gems by hand) I get a working development version.  
*This was also a problem on my laptop, where I merely did an update, and
where your fix to rake gems:install worked.

(Although this is related to  Issue381  in the sense that the
documentation won't lead to working version *complete with production
data*, I will open a new ticket.)

c:\ruby\rails_apps\calagator>rake data:fetch --trace
(in c:/ruby/rails_apps/calagator)
** Invoke data:fetch (first_time)
** Invoke data:prepare (first_time)
** Execute data:prepare
** Execute data:fetch
rake aborted!
uninitialized constant SETTINGS
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/de
pendencies.rb:279:in `load_m
issing_constant'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/de
pendencies.rb:468:in `const_
missing'
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/de
pendencies.rb:480:in `const_
missing'
c:/ruby/rails_apps/calagator/lib/tasks/data_marshal.rake:26
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in
`invoke_with_call_chain'
C:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in
`invoke_with_call_chain'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in
`invoke_task'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in
`top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in
`standard_exception_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
C:/ruby/bin/rake:19:in `load'
C:/ruby/bin/rake:19

Comment 5 by igal.koshevoy, Mar 05, 2009
I've pushed a fix so that "rake data:fetch" will work again.

The issue is that in the past, all rake tasks had complete access to the Rails
environment, whereas after my recent change, they only have access if they explicitly
ask for it. 

For example, the fix for the "data:fetch" problem was by altering
lib/tasks/data_marshall.rb and changing:
-  task :prepare do
+  task :prepare => [:environment] do

The ":environment" is the dependency that tells Rake to load the Rails environment.
Comment 6 by igal.koshevoy, Mar 05, 2009
Joe,

I noticed that you added the text below to the DevelopmentSoftware wiki page.

The fixes I made as part of  Issue 381  make it possible to run 'rake gems:install' to
install all the gems needed by Calagator.

Can you uninstall your copy of vpim and facets, rerun 'rake gems:install' and confirm
that these are installed for you? If so, remove the text from the wiki. If not,
report what went wrong and we'll try to fix the problem.

Thanks!

-igal

---

Missing required gems error

2009.03.05 If -- sometime after cloning the Calagator source code -- you get a
message saying that you are missing required gems and suggesting Run 'rake
gems:install', then follow that suggestion. If that suggestion does not work (you get
the same error message), then install each missing gems individually. If the error
message included a version number in addition to the gem name, install that version.
We also suggest installing without documentation. Example: If the error message said

Missing these required gems:
  vpim
  facets  >= 2.5.0

Then run

gem install vpim --no-rdoc --no-ri
gem install facets -version ">= 2.5.0" --no-rdoc --no-ri 
Comment 7 by jdcohenesq, Mar 07, 2009
I suggest leaving the DevelopmentSoftware wiki page as is.  The reason is:

At least for me, your fix to rake gems:install works fine to *reinstall* the missing
gems, but fails if the missing gems were never there in the first place.  

I install *from scratch* (starting with installing Ruby) -- using the directions in
DevelopmentSoftware -- when I get to rake:db:migrate db:test:prepare, I hit the
Missing required gems problem: running rake gems:install at that point just tells me
that required gems are missing.  

If I then install each missing gem individually by hand, the problem goes away.  From
that point on, if I uninstall vpim or facets, then rake:gems:install will not
complain, and will re-install the missing gem(s).


C:\ruby\rails_apps\calagator>rake db:migrate db:test:prepare
(in C:/ruby/rails_apps/calagator)
** SecretsReader - WARNING! Using insecure 'config/secrets.yml.sample' settings, see
README.txt
Missing these required gems:
  htmlentities
  vpim
  has_many_polymorphs  = 2.12
  rubyzip
  rspec  >= 1.1.12
  rspec-rails  >= 1.1.12
  facets  >= 2.5.0
You're running:
  ruby 1.8.6.111 at C:/ruby/bin/ruby.exe
  rubygems 1.3.1 at C:/Documents and Settings/jdc150/.gem/ruby/1.8,
C:/ruby/lib/ruby/gems/1.8
Run `rake gems:install` to install the missing gems.

C:\ruby\rails_apps\calagator>rake gems:install
(in C:/ruby/rails_apps/calagator)
** SecretsReader - WARNING! Using insecure 'config/secrets.yml.sample' settings, see
README.txt
Missing these required gems:
  htmlentities
  vpim
  has_many_polymorphs  = 2.12
  rubyzip
  rspec  >= 1.1.12
  rspec-rails  >= 1.1.12
  facets  >= 2.5.0
You're running:
  ruby 1.8.6.111 at C:/ruby/bin/ruby.exe
  rubygems 1.3.1 at C:/Documents and Settings/jdc150/.gem/ruby/1.8,
C:/ruby/lib/ruby/gems/1.8
Run `rake gems:install` to install the missing gems.

-----------------------------------------------------
#At this point, I install the missing gems by separately running gem install for each
missing gem.  Viva la difference:
-----------------------------------------------------

C:\ruby\rails_apps\calagator>gem uninstall vpim
Remove executables:
        reminder, rrule
in addition to the gem? [Yn]  y
Removing reminder
Removing rrule
Successfully uninstalled vpim-0.695
C:\ruby\rails_apps\calagator>gem uninstall facets
Successfully uninstalled facets-2.5.1

C:\ruby\rails_apps\calagator>rake gems:install
(in C:/ruby/rails_apps/calagator)
** SecretsReader - WARNING! Using insecure 'config/secrets.yml.sample' settings, see
README.txt
gem.bat install vpim
Successfully installed vpim-0.695
1 gem installed
Installing ri documentation for vpim-0.695...
Installing RDoc documentation for vpim-0.695...
gem.bat install facets --version ">= 2.5.0"
Successfully installed facets-2.5.1
1 gem installed
Installing ri documentation for facets-2.5.1...
Installing RDoc documentation for facets-2.5.1...

Comment 8 by jdcohenesq, Mar 14, 2009
Changing status from "Patch Submitted" to "Fixed"
The only patch has been applied already.
The documentation (the DevelopmentSoftware wiki page) gives instructions that will
result in a working development version of Calagator; the issue cited in Comments 5-7
is still there, but DevelopmentSoftware gives instructions for a work around.  
If that issue is still a problem, we should open a new ticket (or at least re-title
this ticket).
--Joe
Status: Fixed
Sign in to add a comment

Hosted by Google Code