-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog.txt
795 lines (507 loc) · 20.5 KB
/
log.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
======================================================================
WHEN MOVING SITE TO NEW SERVER:
mkdir log
chmod 777 log
chown charman config/environment.rb
touch config/deliver_email
ln -s google_maps_api_key.contactimprov_net.txt google_maps_api_key.txt
Copy httpd.conf redirects
- /jams.html -> /jams
- /events.html -> /events
- /people.html -> /people
======================================================================
THIS COMMIT:
======================================================================
TODO:
@ Revamp login form, Amazon style or similar
@ Add descriptive title to home page
@ Fix problem where Country and State fields are highlighted in red
when editing an event
@ Google Maps
- XML feed
- url and listing_url
- 'USA' or country_name
- format address information using JavaScript
- for multiple listings, show address in title
- links for directions to here, from here
- streetview
- restyle
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/examples/example.html
@ Performance tuning
- caching
- better caching for 'list' views
- by_country
- events (trickier)
- events for iCalendar feeds
- database optimization
[...]
---
@ Calendars
- iCal feeds
- text for calendar subscription page
- find icons for adding iCal calendars
- for events with start/end dates greater than X, create separate
start and end date events instead of having one giant event
@ Geocoding
- update GeoKit settings in initializer file
- admin page for locations that could not be geocoded
- add links to actual actions
- admin action to attempt to re-geocode
- send admin an email if geocoding failed
---
@ Figure out why .text.erb email templates aren't being sent as plain
text, and why settting:
defaults :content_type => "text/plain"
doesn't seem to be working
@ Rewrite forms to use new(-to-project) Rails support for nested forms
@ Google search box for site
- customize look and feel:
http://code.google.com/intl/en/apis/customsearch/docs/ui.html
-
[...]
@ Update 500 error page
@ Authlogic
- functional testing
- password resets
- account activation process
- old passwords still working
[...]
@ Atom feeds
---
@ Configure mail delivery
- can we move config options out of the user_mailer.rb
filter_recipients() function?
@ Switch from YUI datatables to jQuery UI equivalent
@ preferred_url function - returns website for entry, otherwise CI.net link
@ email every user whose account status is pending - perhaps from
GMail account?
@ email obfuscation script:
http://www.projecthoneypot.org/how_to_avoid_spambots_3.php
---
@ Get rid of CountryName.english_name_with_underscores, which is
deprecated thanks to the underlined_english_name database field
@ Create function for Events/People/etc to generate listing URL
- refactor code in events_helper.rb
@ Account requests
- remove white text box from home page
- require users to provide one line description of what information
they want to add to the website
@ Fix left margin when viewing an entry
@ HTML entity decoding when editing forms
- unit testing
@ Allow images to be added to listings
[...]
@ Microformats
- lat/lng
- locations
- events
@ Sort events by date
- unit tests for
- EventEntry.find_by_year[_month]()
- EventEntry.distinct_nonpast_years()
- EventEntry.distinct_nonpast_months()
- functional tests for
- /events/list/YEAR[/MONTH]
...
@ Account request process
- create page where people can check the status of their account requests
- immediately send an email
- link to account request URL
- on "request received" page
- inform people to check their email accounts, check spam filters
- provide link to URL
@ Entry listings
- index pages for listings grouped by country
- Google Maps
- implement caching
- 'preview' feature for editing/creating entries
- OrganizationEntry model
- make Location field optional
- have section of /organizations/list for entries without a
location
- additional fields
- dance repertory company
- commercial business
- not-for-profit business
- regional group
- web group/presence
...
- functional testing
- JamEntry model
- functional testing
- PersonEntry model
- additional fields
...
- functional testing
- add text to Entry pages explaining some simple Textile commands
- add link to unhide a <div> with more formatting info (copy from
BaseCamp Writeboards)
- in listings controller, rename entry_display_name functions, since
category_name_singular now actually fills that role (while a
renamed entry_display_name is still needed for generating routes)
@ Allow people to list themselves as the contact person for an Entry
- functional tests
- integration tests
@ UI/text tweaks
- change color of error messages
- use Adobe Kuler site to find a less appalling shade of red
...
--
@ On /user/request_account page, if someone already has an account
with the listed email address, change error message to be less
confusing
@ Cache Entry list pages (/entries/list and /home/index)
--
@ When destroying an (*)Entry, the attached models are not deleted
- delete the attached models iff they are "dangling"
@ email notification when Entry is modified
- show what fields have changed
@ If someone goes to /#{entry_type}/edit instead of
/#{entry_type}/edit/ID, display a page listing all of the events that
they can edit for that type of entry
@ How to write automated tests that check if caching is working?
@ Refactor auto-complete location actions to separate controllers
@ Entry listings
- validation function for "has at least one of these models"
@ Send email when rejecting a user account request
@ Copy/adapt:
- models
- Entry
- Entity
@ Add FourOhFour model/controller
==[ LOG ]=============================================================
----[ day, July , 2017 ]--------------------------------------
----[ Saturday, July 15, 2017 ]---------------------------------------
@ Ubuntu 12.04 LTS is no longer supported, so I need to upgrade to my
server - and get this app running with a newer version of Ruby.
On Ubuntu 16.04 LTS, with the 'ruby' package installed, the Ruby
version is 2.3.1:
$ ruby --version
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]
and the Gem version is 2.5.1:
$ gem --version
2.5.1
Installed Bundler using:
sudo gem install bundler
which installed Bundler 1.15.1.
Tried running:
bundle update
Got an error message about being unable to install the MySQL gem, as
the VM I'm working in doesn't have MySQL installed. Ran the
recommended command:
sudo apt-get install libmysqlclient-dev
Tried running:
bundle update
and got the error message:
libxml2 is missing. please visit
http://nokogiri.org/tutorials/installing_nokogiri.html for help with
installing dependencies.
Tried installing dependencies:
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
Tried running:
bundle update
and got the error message:
Fetching sanitize 2.0.3
Installing sanitize 2.0.3
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/bundler20170715-30728-1v7mtb6linecache-1.3.1/gems/linecache-1.3.1/ext/linecache
/usr/bin/ruby2.3 -r ./siteconf20170715-30728-1t9535.rb extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
linecache isn't one of the dependencies listed in the Gemfile. Based
on Gemfile.lock, it looks like linecache is being brought in because
of the dependency chain:
ruby-debug
ruby-debug-base
linecache
Tried commenting out this Gemfile line:
gem 'ruby-debug'
Tried running:
bundle update
and this time the command succeeded.
@ Installed MySQL server in the VM:
sudo apt-get install mysql-server
Copied database-related files from the live Ubuntu 12.04 server to the
Ubuntu 16.04 VM:
ci_rails/initialize_db/
ci_rails/DBinit
ci_rails/config/database.yml
ci_rails/config/google_maps_api_key.txt
Ran the command:
./DBinit
and got the error message:
LoadError: Please install the mysql2 adapter: `gem install
activerecord-mysql2-adapter` (can't activate mysql2 (~> 0.3.10),
already activated mysql2-0.4.8. Make sure all dependencies are added
to Gemfile.)
In the Gemfile, tried changing:
gem 'mysql2'
to:
gem 'mysql2', '~>0.3.10'
and now I can successfully run:
./DBinit
Running:
rails server
runs without errors.
@ As a sanity check, is Rails 3.2 even compatible with Ruby 2.3?
Found this blog post, which claims that Rails 3.2.22 is compatible
with Ruby 2.2:
http://weblog.rubyonrails.org/2015/6/16/Rails-3-2-22-4-1-11-and-4-2-2-have-been-released-and-more/
The most recent version of the Rails 3.2.x line is Rails 3.2.22.5.
In this GitHub issue, a user ran into some problems using Rails 3.2
with Ruby 2.3, and was told that Rails 3.2 is no longer supported:
https://github.com/rails/rails/issues/26229
So it's possible the app won't work with Ruby 2.3 unless I upgrade
from Rails 3.2 to 4.2.
@ Running:
rake test:units
generates a ton of ActiveRecord errors. 87 out of 88 tests fail. The
error ActiveRecord error messages seem to look like:
Error:
test_should_unsuspend_user_with_nil_activation_code_and_activated_at_to_passive_state(UserTest):
ActiveRecord::StatementInvalid: Mysql2::Error: Field 'session_id'
doesn't have a default value: INSERT INTO `ci_user_sessions` () VALUES ()
and all of the error messages seem to be the same error message about
the 'ci_user_sessions' table.
The problem was with the fixture file:
ci_rails/test/fixtures/user_sessions.yml
which created some UserSession class instances that were missing the
required field 'session_id'.
@ Test failures:
Unit tests:
- location
- geocoding failure (likely because calling API from wrong host)
- user_account_request
- ?? related to AASM? (acts as state machine)
- users
- ??
In the User model unit tests, I was getting error messages like:
Error:
test_should_unsuspend_user_with_nil_activation_code_and_activated_at_to_passive_state(UserTest):
NoMethodError: undefined method `activated_at' for nil:NilClass
This was caused by version v4.x of the 'aasm' (acts as state machine)
Gem. There are apparently some major differences between aasm 3.x and
aasm 4.x:
https://github.com/aasm/aasm/blob/master/README_FROM_VERSION_3_TO_4.md
Modified the Gemfile, changing:
gem 'aasm'
to:
gem 'aasm', '~>3.4.0'
and that fixed the problems.
----[ Saturday, May 10, 2014 ]----------------------------------------
@ Revisiting long neglected code base.
Code is currently using Rails 3.1.12. The code needs to be updated to
at least the most recent Rails 3.2 (3.2.18), and should possibly be
upgraded to Rails 4.1.
In an Ubuntu 12.04 VM, tried running:
gem install rails -v 3.2.18
and the command seemed to hang for over a minute - but I was
apparently just being impatient.
From the VM, tried running:
bundle install
While trying to install nokigiri, got an error message:
checking for libxml/parser.h... no
libxml2 is missing
Tried:
apt-get install libxml2-dev
which fixed that problem, but I now get the error message:
checking for libxslt/xslt.h... no
Tried:
apt-get install libxslt-dev
and the nokigiri 1.5.6 now installed successfully.
@ Tried running:
rake test
but got the error message:
You have already activated rake 10.0.4, but your Gemfile requires rake
10.0.3. Prepending `bundle exec` to your command may solve this.
hand-edited the Gemfile.lock file, and changed:
rake (10.0.3)
to:
rake (10.0.4)
Ran:
rake test
This time, got the error message:
/home/charman/contact_improv_net/config/initializers/geokit_config.rb:29:in
`initialize': No such file or directory -
config/google_maps_api_key.txt (Errno::ENOENT)
which is an expected error message. Ran:
cd config
ln -s google_maps_api_key.localhost.txt google_maps_api_key.txt
Ran:
rake test
and this time get MySQL error messages about permissions. Ran my
script:
./DBinit
and then re-ran:
rake test
Fixed some RegEx issues matching escaped apostrophes.
Currently the only unit/functional/integration test that doesn't pass
is a unit test for geocoding.
There are a bunch of deprecation warnings:
DEPRECATION WARNING: class_inheritable_attribute is deprecated,
please use class_attribute method instead. Notice their behavior are
slightly different, so refer to class_attribute documentation
first. (called from
/home/charman/contact_improv_net/app/models/user.rb:40)
caused by acts_as_state_machine. The acts_as_state_machine:
http://rubygems.org/gems/acts_as_state_machine
hasn't been updated since 2010-01-13.
@ Updating code to use Rails 3.2[.18] instead of 3.1[.11].
Running:
rake test
generates a lot of deprecation warnings from the acts_as_versioned
Gem:
DEPRECATION WARNING: You're trying to create an attribute
`version_id'. Writing arbitrary attributes on a model is
deprecated. Please just use `attr_writer` etc. (called from
save_version at /home/charman/.bundler/ruby/1.8/acts_as_versioned-63b1fc8529d0/lib/acts_as_versioned.rb:279)
The official acts_as_versioned Gem:
https://github.com/technoweenie/acts_as_versioned
hasn't been updated since April 11, 2012. The most recent commit to
the official version is supposed to fix deprecation warnings with
Rails 3.2.
There are forked versions of the Gem that are supposedly compatible
with Rails 3.2 and Rails 4, such as this version - updated just a few
weeks ago:
https://github.com/mjsommer/acts_as_versioned
but I get the same deprecation warnings when using these versions.
The actual line that is generating the deprecation messages, from the
original version, is 279:
def save_version
if @saving_version
@saving_version = nil
rev = self.class.versioned_class.new
clone_versioned_model(self, rev)
rev.send("#{self.class.version_column}=",
send(self.class.version_column))
rev.send("#{self.class.versioned_foreign_key}=", id)
*279* rev.save
end
end
If other people aren't experiencing these issues (and the commit logs
suggest that the deprecation warnings were already fixed), it's
possible that the deprecation warnings would be fixed if I was using
Ruby 1.9 instead of Ruby 1.8.
----[ Saturday, April 21, 2012 ]--------------------------------------
@ User Natalia Perez:
has been unable to reset her password - she keeps on getting an error
message about "Invalid reset code".
Made local copy of database.
>> u = User.find_by_email('[email protected]')
>> u.password_reset_code
=> nil
Tried generating new password reset code:
>> u.make_password_reset_code
which worked as expected.
----[ Tuesday, November 8, 2011 ]-------------------------------------
Fixed a compatibility problem between the local acts_as_versioned Gem
and Rails 3.1. With Rails 3.1, the primary key for the
Classname::Versions model was being set incorrectly, causing the
one_to_many relationship between Classname and Classname::Versions to
fail on operations such as classname_instance.destroy with MySQL error
messages such as:
test_should_allow_admin_to_delete_event(EventsControllerTest):
ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column
'ci_event_entry_versions.version_id' in 'where clause': DELETE FROM
`ci_event_entry_versions` WHERE
`ci_event_entry_versions`.`event_entry_id` = 100 AND
`ci_event_entry_versions`.`version_id` IS NULL
lib/entry_form_with_optional_models.rb:31:in `delete'
test/functional/events_controller_test.rb:102:in
`test_should_allow_admin_to_delete_event'
where the primary key for the ci_event_entry_versions table should be
'eventy_entry_version_id' and not 'version_id'.
----[ Wednesday, June 1, 2011 ]--------------------------------------
@ Finished migration of the code from Rails 2 to Rails 3, went live
with the Rails 3 version of the site.
----[ Monday, December 14, 2009 ]-------------------------------------
@ Found this sample code for implementing tabbed windows using the
Google Maps API v3 with jQuery:
http://gmaps-samples-v3.googlecode.com/svn/trunk/infowindow/tabs.html
----[ Monday, January 26, 2009 ]--------------------------------------
@ Added a cron script:
/etc/cron.daily/mysqldump_cq_rails
to back up the ci_rails MySQL database daily.
----[ Saturday, January 24, 2009 ]------------------------------------
@ Fixed a bug in my caching code were the cache wasn't being flushed
when modifying a non-US entry.
Since memcached is not flushed when Rails is restarted, had to restart
memcached on my laptop using:
launchctl unload /Library/LaunchDaemons/org.macports.memcached.plist
launchctl load /Library/LaunchDaemons/org.macports.memcached.plist
----[ Tuesday, January 20, 2009 ]-------------------------------------
@ Installed memcached on my MacBook Pro using:
# port install memcached
which installed the program and gave the following error message:
###########################################################
# A startup item has been generated that will aid in
# starting memcached with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w
# /Library/LaunchDaemons/org.macports.memcached.plist
###########################################################
Ran the command to have memcached start with launchd.
Installed the memcache-client gem:
# gem install memcache-client
Changed the cache_store line in config/environment.rb to:
ActionController::Base.cache_store = :mem_cache_store
Then modified config/environments/development.rb to enable caching for
the development environment:
config.action_controller.perform_caching = true
----[ Saturday, January 17, 2009 ]------------------------------------
@ Checked the contactimprov.net SPF record using:
http://www.kitterman.com/spf/validate.html
----[ Thursday, January 15, 2009 ]------------------------------------
@ THE BIG SERVER SWITCH!
ContactImprov.net goes live on my server.
----[ Sunday, January 4, 2009 ]---------------------------------------
@ Installed the sanitize gem on my laptop.
----[ Saturday, January 3, 2009 ]-------------------------------------
@ Downloaded ContactImprov.net website using SiteSucker:
http://www.sitesucker.us/home.html
@ Tried deploying the application to craigharman.net.
Updated rubygems from 1.2.0 to 1.3.1.
While running 'gem update', also updated Passenger from 2.0.5 to
2.0.6. Ran the program:
passenger-install-apache2-module
to compile a new Apache module for Passenger. Updated httpd.conf.
Stopped Apache, then started it.
I try to access the website, but get a Passenger error page with the
error message:
No such file or directory - /nonexistent
Found this post clamining that the error message was caused by a bugy
in RubyGems 1.3:
http://groups.google.com/group/phusion-passenger/browse_thread/thread/dbb6711f24471527
The solution is apparently to make certain that environment.rb is now
owned by 'nobody' or 'root'.
Changed the owner of config/environment.rb to 'charman'. I was then
able to access static pages, but got blank pages when trying to access
Rails actions, with this error message in the Apache logs:
Error during failsafe response: Broken pipe
(originally Broken pipe)
[Sat Jan 03 21:36:46 2009] [error] [client 67.240.191.112] Premature end of script headers:
I deleted the existing log files, and Rails then created new ones -
this time, owned by 'charman'.
----[ Tuesday, December 16, 2008 ]------------------------------------
@ Created Rails project, imported into Subversion.
@ I want to share some code between the ci_rails and cq_rails
projects.
I looked at the documentation for svn:externals:
http://svnbook.red-bean.com/en/1.5/svn.advanced.externals.html
and then issued the following command:
svn propedit svn:externals vendor/plugins
which opened up a text editor, where I added this line:
acts_as_state_machine https://craigharman.net/svn/cq_rails/vendor/plugins/acts_as_state_machine
Subversion 1.5 supports a different syntax for svn:externals
properties, but Leopard still ships with Subversion 1.4, so I'm
currently sticking with the older syntax.
@ Took a quick look around for Rails date/time pickers. There is an
amazing one hosted here:
http://code.google.com/p/calendardateselect/
which can be installed using:
gem install calendar_date_select