I get the following error when loading the root page of the server:
Template is missing
Missing template splash/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :arb, :jbuilder]}.
My splash index page is in app/views/splash/index.html.haml
routes.rb:
root 'splash#index'
post '/signup' => 'splash#signup', as: :splash_signup
get '/spash' => 'splash#index'
The root used to direct to app/views/home/index.html.erb but I removed it and any relating code. Could this be causing my error somehow?
The handlers listed in your error message appear to be missing a handler for haml:
:handlers=>[:erb, :builder, :raw, :ruby, :coffee, :arb, :jbuilder]}.
Adding gem "haml" to your Gemfile, running bundle install and restarting your Rails server should fix this.
You can add the haml-rails gem instead if you want to have your generators use haml as the default for templates generated using Rails' built-in generators.
More info on haml can be found here: https://github.com/haml/haml
The haml-rails documentation is here: https://github.com/indirect/haml-rails
Related
Our current project uses Codeception with the Codeception Allure addon and we are now seeing the following error when we run codecept run acceptance --env chrome --group banana --debug. This error began appearing a few days ago and we are unsure how to correct it. Has anyone ran into this error recently? I have found a number of old posts regarding similar issues but they have all been fixed by the project owners.
[Doctrine\Common\Annotations\AnnotationException]
[Semantical Error] The annotation "#env" in method
LogIntoAdminCest::logIntoAdmin() was never imported. Did you maybe
forget to add a "use" statement for this annotation?
Exception trace:
() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
Doctrine\Common\Annotations\AnnotationException::semanticalError() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:727
Doctrine\Common\Annotations\DocParser->Annotation() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:663
Doctrine\Common\Annotations\DocParser->Annotations() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:354
Doctrine\Common\Annotations\DocParser->parse() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php:284
Doctrine\Common\Annotations\AnnotationReader->getMethodAnnotations() at /vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php:71
Doctrine\Common\Annotations\IndexedReader->getMethodAnnotations() at /vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Annotation/AnnotationProvider.php:43
Yandex\Allure\Adapter\Annotation\AnnotationProvider::getMethodAnnotations() at /vendor/allure-framework/allure-codeception/src/Yandex/Allure/Adapter/AllureAdapter.php:250
Yandex\Allure\Adapter\AllureAdapter->testStart() at n/a:n/a
call_user_func() at /vendor/symfony/event-dispatcher/EventDispatcher.php:212
Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() at /vendor/symfony/event-dispatcher/EventDispatcher.php:44
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /vendor/codeception/codeception/src/Codeception/PHPUnit/Listener.php:90
Codeception\PHPUnit\Listener->startTest() at /vendor/phpunit/phpunit/src/Framework/TestResult.php:386
PHPUnit_Framework_TestResult->startTest() at /vendor/codeception/codeception/src/Codeception/Test/Test.php:74
Codeception\Test\Test->run() at /vendor/phpunit/phpunit/src/Framework/TestSuite.php:722
PHPUnit_Framework_TestSuite->run() at /vendor/codeception/codeception/src/Codeception/PHPUnit/Runner.php:106
Codeception\PHPUnit\Runner->doEnhancedRun() at /vendor/codeception/codeception/src/Codeception/SuiteManager.php:157
Codeception\SuiteManager->run() at /vendor/codeception/codeception/src/Codeception/Codecept.php:184
Codeception\Codecept->runSuite() at /vendor/codeception/codeception/src/Codeception/Codecept.php:175
Codeception\Codecept->run() at /vendor/codeception/codeception/src/Codeception/Command/Run.php:376
Codeception\Command\Run->runSuites() at /vendor/codeception/codeception/src/Codeception/Command/Run.php:303
Codeception\Command\Run->execute() at /vendor/symfony/console/Command/Command.php:264
Symfony\Component\Console\Command\Command->run() at /vendor/symfony/console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /vendor/symfony/console/Application.php:228
Symfony\Component\Console\Application->doRun() at /vendor/symfony/console/Application.php:130
Symfony\Component\Console\Application->run() at /vendor/codeception/codeception/src/Codeception/Application.php:103
Codeception\Application->run() at /vendor/codeception/codeception/codecept:36
run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--] [<suite>] [<test>]
I left to guess of what to do as after installing all the dependencies and easysearch:autosuggest in an application the app began to throw error. I'm on Meteor version-1.2.1. I'd thought it's lodash that's causingthe problem but after installing lodash the problem persists.
=> Meteor server restarted
Changes to your project's package version selections:
easysearch:autosuggest added, version 2.0.10
W20170706-14:37:18.456(1)? (STDERR)
W20170706-14:37:18.462(1)? (STDERR) C:\Users\ken4ward\AppData\Local\.meteor\packages\meteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:245
W20170706-14:37:18.462(1)? (STDERR) throw(ex);
W20170706-14:37:18.462(1)? (STDERR) ^
W20170706-14:37:18.462(1)? (STDERR) ReferenceError: Template is not defined
W20170706-14:37:18.465(1)? (STDERR) at Package (lib/autosuggest.js:1:1)
W20170706-14:37:18.465(1)? (STDERR) at C:\Programs\contract\crowducate-platform\.meteor\local\build\programs\server\packages\easysearch_autosuggest.js:101:4
W20170706-14:37:18.465(1)? (STDERR) at C:\Programs\contract\crowducate-platform\.meteor\local\build\programs\server\packages\easysearch_autosuggest.js:108:3
W20170706-14:37:18.466(1)? (STDERR) at C:\Programs\contract\crowducate-platform\.meteor\local\build\programs\server\boot.js:242:10
W20170706-14:37:18.472(1)? (STDERR) at Array.forEach (native)
W20170706-14:37:18.47 Selecting package versions -h (C:\Users\ken4ward\AppData\Local\.meteor\packages\m
eteor-tool\1.1.10\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\underscore\underscore.js:79:1 TDERR) at C:\Programs\contract\crowducate-platform\.meteor\local\build\programs\server\
boot.js:137:5 Selecting package versions /
=> Exited with code: 8
meteor packages
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
less
accounts-password
useraccounts:bootstrap
alanning:roles
zimme:iron-router-active
cmather:handlebars-server#0.2.0
dburles:collection-helpers
reywood:publish-composite
mrt:moment
mrt:underscore-string-latest
matb33:collection-hooks
dburles:factory
anti:fake
cunneen:mailgun
iron:router#1.0.0
yasinuslu:blaze-meta
insecure
jeremy:selectize
reactive-var
rubaxa:sortable
cfs:filesystem
cfs:standard-packages
gadicohen:messageformat
browser-policy
aldeed:autoform
aldeed:collection2
babrahams:editable-text-wysiwyg-bootstrap-3
useraccounts:iron-routing
juliancwirko:s-alert
standard-minifiers
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
random
ejson
spacebars
check
themeteorchef:bert
ctjp:meteor-intl-tel-input
u2622:persistent-session
meteor version
accounts-base#1.2.2
accounts-password#1.1.4
alanning:roles#1.2.14
aldeed:autoform#5.7.1
aldeed:collection2#2.5.0
aldeed:simple-schema#1.4.0
amplify#1.0.0
anti:fake#0.4.1
autoupdate#1.2.4
babel-compiler#5.8.24_1
babel-runtime#0.1.4
babrahams:editable-text#0.8.6
babrahams:editable-text-wysiwyg#0.5.6
babrahams:editable-text-wysiwyg-bootstrap-3#0.5.6
base64#1.0.4
binary-heap#1.0.4
blaze#2.1.3
blaze-html-templates#1.0.1
blaze-tools#1.0.4
boilerplate-generator#1.0.4
browser-policy#1.0.5
browser-policy-common#1.0.4
browser-policy-content#1.0.6
browser-policy-framing#1.0.6
caching-compiler#1.0.0
caching-html-compiler#1.0.2
callback-hook#1.0.4
cfs:access-point#0.1.49
cfs:base-package#0.0.30
cfs:collection#0.5.5
cfs:collection-filters#0.2.4
cfs:data-man#0.0.6
cfs:file#0.1.17
cfs:filesystem#0.1.2
cfs:http-methods#0.0.30
cfs:http-publish#0.0.13
cfs:power-queue#0.9.11
cfs:reactive-list#0.0.9
cfs:reactive-property#0.0.4
cfs:standard-packages#0.5.9
cfs:storage-adapter#0.2.3
cfs:tempstore#0.1.5
cfs:upload-http#0.0.20
cfs:worker#0.1.4
check#1.1.0
cmather:handlebars-server#0.2.0
coffeescript#1.0.11
ctjp:meteor-intl-tel-input#3.7.1_2
cunneen:mailgun#0.9.1
dburles:collection-helpers#1.0.4
dburles:factory#0.3.10
dburles:mongo-collection-instances#0.3.4
ddp#1.2.2
ddp-client#1.2.1
ddp-common#1.2.2
ddp-rate-limiter#1.0.0
ddp-server#1.2.2
deps#1.0.9
diff-sequence#1.0.1
djedi:sanitize-html#1.11.1
ecmascript#0.1.6
ecmascript-runtime#0.2.6
ejson#1.0.7
email#1.0.8
fastclick#1.0.7
fortawesome:fontawesome#4.4.0_1
fourseven:scss#3.3.3_3
gadicohen:headers#0.0.31
gadicohen:messageformat#0.0.52
geojson-utils#1.0.4
handlebars#1.0.4
hot-code-push#1.0.0
html-tools#1.0.5
htmljs#1.0.5
http#1.1.1
id-map#1.0.4
insecure#1.0.4
iron:controller#1.0.12
iron:core#1.0.11
iron:dynamic-template#1.0.12
iron:layout#1.0.12
iron:location#1.0.11
iron:middleware-stack#1.1.0
iron:router#1.0.12
iron:url#1.0.11
jeremy:selectize#0.12.1_4
jquery#1.11.4
juliancwirko:s-alert#3.1.2
lai:collection-extensions#0.1.4
launch-screen#1.0.4
less#2.5.1
livedata#1.0.15
localstorage#1.0.5
logging#1.0.8
matb33:collection-hooks#0.8.1
mdg:validation-error#0.1.0
meteor#1.1.10
meteor-base#1.0.1
meteorhacks:inject-initial#1.0.3
minifiers#1.1.7
minimongo#1.0.10
mobile-experience#1.0.1
mobile-status-bar#1.0.6
momentjs:moment#2.10.6
mongo#1.1.3
mongo-id#1.0.1
mongo-livedata#1.0.9
mrt:moment#2.8.1
mrt:underscore-string-latest#2.3.3
npm-bcrypt#0.7.8_2
npm-mongo#1.4.39_1
observe-sequence#1.0.7
ordered-dict#1.0.4
promise#0.5.1
raix:eventemitter#0.1.3
random#1.0.5
rate-limit#1.0.0
reactive-dict#1.1.3
reactive-var#1.0.6
reload#1.1.4
retry#1.0.4
reywood:publish-composite#1.4.2
routepolicy#1.0.6
rubaxa:sortable#1.3.0
service-configuration#1.0.5
session#1.1.1
sha#1.0.4
softwarerero:accounts-t9n#1.1.6
spacebars#1.0.7
spacebars-compiler#1.0.7
srp#1.0.4
standard-minifiers#1.0.2
templating#1.1.5
templating-tools#1.0.0
themeteorchef:bert#2.1.0
tracker#1.0.9
u2622:persistent-session#0.4.4
ui#1.0.8
underscore#1.0.4
underscorestring:underscore.string#3.2.2
url#1.0.5
useraccounts:bootstrap#1.12.4
useraccounts:core#1.12.4
useraccounts:iron-routing#1.12.4
webapp#1.2.3
webapp-hashing#1.0.5
yasinuslu:blaze-meta#0.3.3
zimme:iron-router-active#1.0.4
These are the contents of the meteor version and packages.
I'm trying to reproduce this tutorial : YouTube API, Version 3 on Rails
in order to apply it on my own project. But I'm having a hard with it since few days.
At first, I had this error :
A request to YouTube API caused an unexpected server error: To display
more verbose errors, change the configuration of Yt with: Yt.configure
do |config| config.log_level = :debug end
I updated RVM and Ruby and I'm getting this error now :
Yt::Errors::Forbidden in VideosController#create A request to YouTube
API was considered forbidden by the server: To display more verbose
errors, change the configuration of Yt with: Yt.configure do |config|
config.log_level = :debug end
I already :
get ruby and rvm updated
tried different version of the yt gem
tried that : OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
tried that : config.force_ssl = false
this
curl -X GET -H "content-length: 0" -H "user-agent: Yt::Request (gzip)" -H "host: www.googleapis.com" "https://www.googleapis.com/youtube/v3/videos?id=wuZfOIWwM_Y&part=snippet"
return that :
Using Rails 4.2.4, Ruby 2.3.0;
Source code at : https://github.com/NeimadTL/YT_Sample_App
Any help, suggestions would be strongly and sincerely appreciated.
forbidden (403) forbidden Access forbidden. The request may not be properly authorized.
Answer: The request you are making is not authorized. update: Change key= to access_token=
Possible cause:
https://www.youtube.com/annotations_invideo?key=
You are trying to run a request annotations_invideo (which I cant actually find any were in the documentation) and you are applying an API key to it. API keys only work with public data. Either annotations_invideo is not a valid request to the API or its something that you need to be authenticated for. If you need to be authenticated then you will need an access token and then apply access_token= instead of key=
where exactly did you find annotations_invideo ?
Update:
Lucky for me it has been under an hour since you posted your question I was able to take
https://www.youtube.com/annotations_invideo?access_token=AIzaSyBSvIOM0EGX1tcrf5IAlYJuH_ttqVgTO4Q&video_id=BPNYv0vd78A
and dump it in a web browser it returned data.
<document>
<annotations>
<annotation author="" id="annotation_1585555999" log_data="ei=B2k9WIOCB8X0dNKokKAG&a-id=annotation_1585555999&xble=1&a-type=4&a-v=BPNYv0vd78A" style="title" type="text">
<TEXT>Hello, world!</TEXT>
<segment>
<movingRegion type="rect">
<rectRegion d="0" h="25.2779998779" t="0:00.000" w="75.0" x="13.1540002823" y="67.3239974976"/>
<rectRegion d="0" h="25.2779998779" t="0:02.089" w="75.0" x="13.1540002823" y="67.3239974976"/>
</movingRegion>
</segment>
<appearance bgAlpha="0.25" bgColor="0" borderAlpha="0.10000000149" effects="" fgColor="16777215" fontWeight="bold" highlightFontColor="16777215" textSize="21.6642"/>
</annotation>
<annotation id="channel:563d3ce4-0000-20cc-8fd5-001a11463304" style="playlist" type="promotion" log_data="ei=B2k9WIOCB8X0dNKokKAG&a-type=12&a-ch=UCwCnUcLcb9-eSrHa_RQGkQQ&xble=1&a-id=563d3ce4-0000-20cc-8fd5-001a11463304&l-class=2&link-id=PLuW4g7xujBWfU26JUTW1DGs3hk4LD5KaL&a-v=BPNYv0vd78A">
<data>
{"playlist_length":"200","session_data":{"itct":"CAIQwTcY____________ASITCMOh497wzdACFUU6HQodUhQEZCj4HTICaXZIwN_33vSX1vkE","annotation_id":"563d3ce4-0000-20cc-8fd5-001a11463304","feature":"iv","ei":"B2k9WIOCB8X0dNKokKAG","src_vid":"BPNYv0vd78A"},"is_mobile":false,"text_line_2":"Adorable Kids","text_line_1":"Check this playlist","image_url":"https:\/\/i.ytimg.com\/vi\/yDrLVqRHAsw\/mqdefault.jpg","start_ms":1000,"collapse_delay_ms":86400000,"end_ms":3000}
</data>
<segment/>
<action trigger="click" type="openUrl">
<url type="hyperlink" target="new" value="https://www.youtube.com/watch?v=yDrLVqRHAsw&list=PLuW4g7xujBWfU26JUTW1DGs3hk4LD5KaL"/>
</action>
</annotation>
</annotations>
</document>
Note: I wonder why this is returning XML and not Json it has me thinking this is an older api. Found it you are using the YouTube API v2 which is deprecated It should have been shut down .
https://youtube-eng.googleblog.com/2014/09/have-you-migrated-to-data-api-v3-yet.html
you should drop this and move to the YouTube API v3
Hello guys I am trying to integrate facebook login in my rails application
I included gems in my gem file
gem 'omniauth'
gem 'omniauth-facebook', '~> 1.4.1'
and in my omniauth file
an in my routes.rb file
get 'auth/:provider/callback', to: 'users#screate',:as => :callback
i have added in my omniauth.rb
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, '632837163475474', 'b1db948ee52851623397e66b293ff45a',{provider_ignores_state: true}
end
but when I try to login I get the following error
OmniAuth::Strategies::Facebook::NoAuthorizationCodeError
must pass either a `code` parameter or a signed request (via `signed_request` parameter or a `fbsr_XXX` cookie)
if I remove
{provider_ignores_state: true}
I get following error
csrf_detected | CSRF detected
When you try to login, are you linking to "/auth/facebook"? This URL sets up the signed request that your error is suggesting you don't have...
I need to render a template from a plugin to a .gsp page. I wrote : <g:render plugin="melanin 2.0.0" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>
But then I get this error :
Error 500: Error processing GroovyPageView: Template not found for
name [/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Servlet:
grails URI: /RBCS/grails/VIBAction/index.dispatch Exception Message:
Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Caused by:
Error processing GroovyPageView: Template not found for name
[/m-melanin-fingerprint/m-melanin-fingerprint-sidebar] and path
[/m-melanin-fingerprint/_m-melanin-fingerprint-sidebar.gsp] Class:
actionPlan.gsp At Line: [40] Code Snippet: 39: 40: 41:
This is my project:
Please help me fix it. Sorry my English is not good. Thank you.
try removing the version from your plugin-ref:
<g:render plugin="melanin" template="/m-melanin-fingerprint/m-melanin-fingerprint-sidebar"/>