Skip to content

Instantly share code, notes, and snippets.

@jason
jason / gist:fc2697f25625af2af449
Created September 15, 2014 19:15
error in phoenix
No such template "index.html" for PhoenixTutorial.PageView
Stacktrace
(phoenix_tutorial) web/views/page_view.ex:1: PhoenixTutorial.PageView.render/2
(phoenix) lib/phoenix/view.ex:88: Phoenix.View.render_within/4
(phoenix) lib/phoenix/controller.ex:141: Phoenix.Controller.render_view/5
(phoenix_tutorial) web/controllers/page_controller.ex:1: PhoenixTutorial.PageController.plug_builder_call/2
(phoenix) lib/phoenix/router.ex:105: Phoenix.Router.perform_dispatch/2
(phoenix_tutorial) web/router.ex:1: PhoenixTutorial.Router.plug_builder_call/2
phoenix_tutorial tree web/
web/
├── channels
├── controllers
│   └── page_controller.ex
├── i18n.ex
├── models
│   ├── jobs.ex
│   ├── queries.ex
│   └── repo.ex
@jason
jason / gist:f2e0aa0fe55ceb96bcdf
Created July 12, 2015 18:08
Unchecked dependency
Unchecked dependencies for environment dev:
* postgrex (Hex package)
the dependency postgrex defined
> In mix.exs:
{:postgrex, ">= 0.0.0", [hex: :postgrex]}
does not match the requirement specified
> In deps/ecto/mix.exs:
rake aborted!
undefined method `[]' for #<Enumerable::Enumerator:0x9849d5c>
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/core_ext/string/access.rb:43:in `first'
/var/www/mephisto/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:66:in `has_attachment'
./db/migrate//033_user_hostile_template_migration.rb:8
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:489:in `load'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:489:in `load'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:342:in `new_constants_in'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:489:in `load'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/migration.rb:360:in `migration_classes'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/mysql_adapter.rb:472:in `real_connect': Unknown database 'mephisto_development' (Mysql::Error)
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/mysql_adapter.rb:472:in `connect'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/mysql_adapter.rb:165:in `initialize'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `new'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in `send'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/connection_adapters/abstract/connec
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant Rails::Info (NameError)
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:453:in `const_missing'
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.0.5/lib/commands/about.rb:2
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/about:3
[root@dev /var/www/mephisto]#
Processing ArticlesController#new (for 71.131.187.156 at 2008-12-06 18:56:22) [GET]
Session ID: BAh7CDoOcmV0dXJuX3RvMDoJdXNlcmkGIgpmbGFzaElDOidBY3Rpb25Db250%0Acm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--e968445f47c716749fc560dbe109721a3770924d
Parameters: {"action"=>"new", "controller"=>"admin/articles"}
LoadError (Expected /var/www/jasonwong/app/models/asset.rb to define Asset):
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:249:in `load_missing_constant'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:453:in `const_missing'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.5/lib/active_support/dependencies.rb:465:in `const_missing'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0.5/lib/active_record/base.rb:1762:in `compute_type'
NoMethodError in Admin/overview#index
Showing admin/overview/_comment_event.rhtml where line #8 raised:
undefined method `-' for {:length=>100}:Hash
Extracted source (around line #8):
5:
6: <span class="event-time"><%= event_time_for event, later %></span>
[root@dev /var/www/jasonwong]# script/console RAILS_ENV=production
Loading RAILS_ENV=production environment (Rails 2.2.2)
/opt/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:340:in `read':Errno::ENOENT: No such file or directory - /var/www/jasonwong/config/environments/RAILS_ENV=production.rb
/var/www/jasonwong/app/controllers/application.rb:9:NoMethodError: undefined method `auto_include!' for ApplicationController:Class
>> Asset
ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in `retrieve_connection'
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in `connectio
# Helper methods defined here can be accessed in any controller or view in the application
Emparse.helpers do
def logindata(login, password, spreadkey)
session = GoogleSpreadsheet.login(login, password)
ws = session.spreadsheet_by_key(spreadkey).worksheets[0]
fname = []
lname = []
address = []
for row in 2..ws.num_rows