Giter Site home page Giter Site logo

sinatra-hello-world-basics's Introduction

Sinatra Hello World Basics

Objectives

  1. Create a basic Sinatra application.
  2. Write a get method.
  3. Render a string from that get method.

Instructions

Fork and clone this repository and run bundle install to get started!

On your local environment (not in the IDE), run shotgun to start a local server so that you can test your app in your browser. Shotgun default is using port 9393, you should be able to visit the following url http://localhost:9393.

  1. Write a get method in the app.rb file to respond to the root URL '/'.
  2. The get route should respond with the string "Hello, World!".

You can run learn test to see error messages.

Resources

Sinatra Basics

sinatra-hello-world-basics's People

Contributors

aviflombaum avatar dependabot[bot] avatar drakeltheryuujin avatar ihollander avatar lizbur10 avatar maxwellbenton avatar timothylevi avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sinatra-hello-world-basics's Issues

failures while running bundle install

nokogiri failed to install, @loganhasson helped me, i ended up having to run:

gem install nokogiri -v 1.6.6.2 -- --use-system-libraries

the event machine filed to install, logan helped me with:

gem install eventmachine -v 1.0.7 -- --with-cppflags=-I/usr/local/opt/openssl/include

Alterations to Gemfile.lock could be necessary.

I could not install the gems, and with help from a technical coach and another student (who experienced the same issue) found that I could not install the gems unless I deleted the Gemfile.lock.

This is the error I was getting:

Fetching gem metadata from https://rubygems.org/........
Using rake 10.4.2
Using bundler 1.17.1
Using mime-types 2.4.3
Using mini_portile 0.6.2
Fetching nokogiri 1.6.6.2
Installing nokogiri 1.6.6.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/helloamandamurphy/.rvm/gems/ruby-2.5.3/gems/nokogiri-1.6.6.2/ext/nokogiri
/Users/helloamandamurphy/.rvm/rubies/ruby-2.5.3/bin/ruby -r
./siteconf20190308-25558-19kcbb3.rb extconf.rb
checking if the C compiler accepts ... yes
checking if the C compiler accepts
-Wno-error=unused-command-line-argument-hard-error-in-future... no
Building nokogiri using packaged libraries.
-----
The file "/usr/include/iconv.h" is missing in your build environment,
which means you haven't installed Xcode Command Line Tools properly.

To install Command Line Tools, try running `xcode-select --install` on
terminal and follow the instructions.  If it fails, open Xcode.app,
select from the menu "Xcode" - "Open Developer Tool" - "More Developer
Tools" to open the developer site, download the installer for your OS
version and run it.
-----
*** 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
	--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=/Users/helloamandamurphy/.rvm/rubies/ruby-2.5.3/bin/$(RUBY_BASE_NAME)
	--help
	--clean
	--use-system-libraries
	--enable-static
	--disable-static
	--with-zlib-dir
	--without-zlib-dir
	--with-zlib-include
	--without-zlib-include=${zlib-dir}/include
	--with-zlib-lib
	--without-zlib-lib=${zlib-dir}/lib
	--enable-cross-build
	--disable-cross-build

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/Users/helloamandamurphy/.rvm/gems/ruby-2.5.3/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.6.6.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/Users/helloamandamurphy/.rvm/gems/ruby-2.5.3/gems/nokogiri-1.6.6.2 for
inspection.
Results logged to
/Users/helloamandamurphy/.rvm/gems/ruby-2.5.3/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.6.6.2/gem_make.out

An error occurred while installing nokogiri (1.6.6.2), and Bundler
cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.2' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  capybara was resolved to 2.4.4, which depends on
    xpath was resolved to 2.0.0, which depends on
      nokogiri``` 

I attempted to reinstall nokogiri, xcode, etc. individually and it didn't work until the Gemfile.lock was deleted.

Hope this is helpful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.