Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example app not working as expected #6

Open
darkwiz opened this issue Aug 13, 2018 · 6 comments
Open

Example app not working as expected #6

darkwiz opened this issue Aug 13, 2018 · 6 comments

Comments

@darkwiz
Copy link

darkwiz commented Aug 13, 2018

I really like your project but i do not understand how to make it work properly. I'm trying your basic tutorial https://github.com/namusyaka/react-sinatra-sample But i think something is wrong.

Steps to Reproduce the Problem

  1. Hitting http://localhost:4567/ print out this is an example for react-siantra as expected
  2. Hitting http://localhost:4567/react-component print out "{"name":"namusyaka"}"}"> (adding a parameter to the request namusyaka changes as expected) the page body content is the following:
    <div data="{:react_class=>" commentbox",="" :react_props="">"{"name":"namusyaka"}"}">
  3. Hitting http://localhost:4567/react-component-with-server print out the following error:
    [2018-08-13 14:21:27] INFO WEBrick::HTTPServer#start: pid=24271 port=4567
    2018-08-13 14:21:32 - NoMethodError - undefined method `concat' for #React::Sinatra::Component:0x0000000001530ce0 Did you mean? concern:

Specifications

  • Version: Ruby ruby 2.3.7p456, Sinatra 1.4.7, react-sinatra 0.1.1, Node v6.11.3
  • Platform: Linux/ Ubuntu 14.04.5

Many thanks

@namusyaka
Copy link
Owner

Strange. Couldn't reproduce in my locally.
Could you try to upgrade ruby version into 2.4.X?

@darkwiz
Copy link
Author

darkwiz commented Aug 17, 2018

I've updated ruby to version ruby 2.4.4p296 (2018-03-28 revision 63013)
Now, when i execute bundle exec ruby app.rb i get some warning messages:

/home/matteog/.rvm/gems/ruby-2.4.4@padrino/gems/sinatra-1.4.7/lib/sinatra/base.rb:1226: warning: constant ::Fixnum is deprecated
/home/matteog/.rvm/gems/ruby-2.4.4@padrino/gems/sinatra-1.4.7/lib/sinatra/base.rb:1226: warning: constant ::Fixnum is deprecated
/home/matteog/.rvm/gems/ruby-2.4.4@padrino/gems/sinatra-1.4.7/lib/sinatra/base.rb:1226: warning: constant ::Fixnum is deprecated
/home/matteog/.rvm/gems/ruby-2.4.4@padrino/gems/sinatra-1.4.7/lib/sinatra/base.rb:1226: warning: constant ::Fixnum is deprecated
/home/matteog/.rvm/gems/ruby-2.4.4@padrino/gems/sinatra-1.4.7/lib/sinatra/base.rb:1226: warning: constant ::Fixnum is deprecated

However the final result is the same. (http://localhost:4567/react-component-with-server)

immagine

http://localhost:4567/react-component
immagine

@Hamms
Copy link

Hamms commented Jan 7, 2019

@namusyaka I'm also reproing the undefined method 'concat' error on ruby v2.5.0

@Hamms
Copy link

Hamms commented Jan 8, 2019

The problem seems to be specifically with react-sinatra 0.1.1; 0.1.0 works fine.

@FaustoPayano
Copy link

hi @Hamms Could you tell me exactly what versions of Sinatra, react on rails etc.. you are on? I'm running into the same exact issue and tried to upgrade to 2.50 + react sinatra 0.1.0 -> I still get the concat issue.

@joshleblanc
Copy link

I just ran into this problem today. I pinned padrino-helpers to version 0.14.4 to fix it.

No idea what version broke the functionality, I just had a working copy on that version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants