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

Creation of rails-api fails #4

Closed
kofronpi opened this issue Nov 30, 2015 · 4 comments
Closed

Creation of rails-api fails #4

kofronpi opened this issue Nov 30, 2015 · 4 comments

Comments

@kofronpi
Copy link

Hello

My env :
Ubuntu 14.04
RVM with ruby 2.2.3
NVM with node 4.2.2

The generator fails at the rails-api part.

Here is the relevant stacktrace:

----> Installing `rails-api` gem...

$ rvm ruby-2.2.3@attract do gem install rails-api --quiet
Successfully installed thor-0.19.1
Successfully installed thread_safe-0.3.5
Successfully installed minitest-5.8.3
Successfully installed tzinfo-1.2.2
Successfully installed i18n-0.7.0
Successfully installed activesupport-4.2.5
Successfully installed rails-deprecated_sanitizer-1.0.3
Successfully installed mini_portile2-2.0.0
Building native extensions.  This could take a while...
ERROR:  Error installing rails-api:
    ERROR: Failed to build gem native extension.

    /home/pak/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151130-27082-bpuagn.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/pak/.rvm/rubies/ruby-2.2.3/bin/$(RUBY_BASE_NAME)
    --help
    --clean
/home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile'
    from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror'
    from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile'
    from extconf.rb:80:in `nokogiri_try_compile'
    from extconf.rb:87:in `block in add_cflags'
    from /home/pak/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags'
    from extconf.rb:86:in `add_cflags'
    from extconf.rb:336:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/pak/.rvm/gems/ruby-2.2.3@attract/gems/nokogiri-1.6.7 for inspection.
Results logged to /home/pak/.rvm/gems/ruby-2.2.3@attract/extensions/x86_64-linux/2.2.0/nokogiri-1.6.7/gem_make.out
Completed.


----> Creating Rails app...

$ rvm ruby-2.2.3@attract do rails-api new attract-api --skip-sprockets --skip-bundle --quiet --database=postgresql
/home/pak/.rvm/scripts/set: line 19: exec: rails-api: not found
Completed.

Thank you for your help

@kofronpi
Copy link
Author

It was an issue with RVM and nokogiri I never had before: rvm/rvm#3509

I'm closing this issue, sorry.

@alex35mil
Copy link
Owner

@kofronpi No probs. Actually a lot of deps were updated in the Node app, so this generator is most likely broken. I already updated a bunch of things on my local machine and wait for this PR to post new beta of this generator.

@kofronpi
Copy link
Author

@alexfedoseev Thank you for your answer ! I plan on using your generator for a project, so if you have some directions (a branch ? ) about fixing things in the node app before I start coding it would be great 👍

@alex35mil
Copy link
Owner

@kofronpi Not yet, on my local machine only. Too many things were changed, so it's better to wait until I push something here.

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

2 participants