crystal-lang


Unable to compile after upgrade from crystal 0.19.4 to 0.20


The shards install went well but compilation gave this error.
Checked with icr that able to connect to local postgres database successfully. Any help is greatly appreciated! Thank you.
[aranin#acbc328b9a5b:kemal-react-pg-chat-master]$ crystal build src/app.cr --release
Error in src/app.cr:44: instantiating 'Kemal:Module#run()'
Kemal.run
^~~
in lib/kemal/src/kemal.cr:11: instantiating 'run(Nil)'
def self.run(port = nil)
^
in lib/kemal/src/kemal.cr:41: instantiating 'HTTP::Server::Context#params()'
image = env.params.url["image"]
^~~~~~
in lib/kemal/src/kemal/context.cr:11: instantiating 'route_lookup()'
#request.url_params ||= route_lookup.params
^~~~~~~~~~~~
in lib/kemal/src/kemal/context.cr:21: instantiating 'HTTP::Request#override_method()'
Kemal::RouteHandler::INSTANCE.lookup_route(#request.override_method.as(String), #request.path)
^~~~~~~~~~~~~~~
in lib/kemal/src/kemal/request.cr:7: instantiating 'check_for_method_override!()'
#override_method ||= check_for_method_override!
^~~~~~~~~~~~~~~~~~~~~~~~~~
in lib/kemal/src/kemal/request.cr:14: instantiating 'Kemal::ParamParser#body()'
params = Kemal::ParamParser.new(self).body
^~~~
in lib/kemal/src/kemal/param_parser.cr:24: expanding macro
{% for method in %w(url query body json) %}
^
in macro 'macro_4590134368' /Users/aranin/Documents/rub-me/crystalax/kemal-react-pg-chat-master/lib/kemal/src/kemal/param_parser.cr:24, line 26:
It probably means that a version of kemal that targets Crystal 0.20.0 wasn't released yet. You can change your shard.yml file to point to the master branch:
dependencies:
kemal:
github: sdogruyol/kemal
branch: master
That worked for me.
Kemal 0.17.0 released with Crystal 0.20.0 support. If you don't want to track master you can use it with
dependencies:
kemal:
github: sdogruyol/kemal
version: 0.17.0

Related Links

Crystal C bindings: return type char*
Make Class member attribute of type Array(T) accept 2D arrays of T
JSON.mapping if “root” attribute has inherit keys
Crystal C bindings: using fopen
Define Class object validations
Set attribute of type “Class” to define it as Int32, String, Float64
Set both default attribute and type of attribute
How can I test private methods?
Write binary data to stdout in Crystal
Unable to compile after upgrade from crystal 0.19.4 to 0.20
Application server for Crystal web app / Kemal
Crystal Fiber error - “Unhandled exception in spawn: SSL_shutdown: Operation now in progress (Errno)”
Convert hex string to int in Crystal
Crystal convert string to hash from response.body
Crystal no overload matches 'Array(Type)#[]' with type (Int32 | Nil)
Crystal method return multiple values

Categories

HOME
search
jpa
c++11
time-complexity
telegram
ecmascript-6
jax-rs
pyqt
owl-carousel
access
seo
jetty
vert.x
extjs4.2
sendgrid-api-v3
project-intu
rtf
aws-sdk
nodemcu
delphi-xe5
imageresizer
mongoid6
tosca
resourcebundle
underscore.js
cppreference
browser-sync
nsurl
calculation
scrollview
angularjs-material
android-sugarorm
gojs
android-maps-extensions
activexobject
arduino-ide
docfx
ogc
odoo-website
escpos
naming
print-css
congestion-control
placeholder
importerror
procfile
netbeans6.8
dtsearch
identification
singleinstance
filehandle
jqchart
boo
quicktime
oozie-coordinator
rmongo
polyline
cubism.js
hadoop-2.7.2
gogs
qiime
lua-telegram-bot
blitline
terracotta
forwarding
rate-limiting
sha512
branch-and-bound
linked-tables
keyup
cwrsync
google-refine
cross-join
uncaught-typeerror
rcaller
reflector
amslidemenu
process-explorer
server-administration
http-status-code-410
cross-database
virtualpathprovider
xcelsius
update-statement
resharper-6.0
ie-compatibility-mode
cruisecontrol.rb
scrollbars
tui
fault-tolerance

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App