Coder Social home page Coder Social logo

rails_tutorial_4th_edition_gemfiles's Introduction

rails_tutorial_4th_edition_gemfiles's People

Contributors

mhartl avatar

Stargazers

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

Watchers

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

rails_tutorial_4th_edition_gemfiles's Issues

rails test running twice in 3.3.1/not failing more than one test when it's supposed to

When I run the tests in Chapter 3.3.1, the console is showing that the tests are running twice for some reason.

Running via Spring preloader in process 4008
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here
Run options: --seed 61073

# Running:

Run options: --seed 61073

# Running:

....

Finished in 0.315740s, 6.3343 runs/s, 6.3343 assertions/s.

2 runs, 2 assertions, 0 failures, 0 errors, 0 skips


Finished in 0.315642s, 6.3363 runs/s, 6.3363 assertions/s.

This shouldn't be a problem, but when I try to do more than one failing test (for example, the test in 3.3.2 as well as changing "should get help" so that assert_response is looking for :error), it fails the first failing test and immediately exits instead of moving to the next test.

ec2-user:~/environment/sample_app2 (static-pages) $ rails test
Running via Spring preloader in process 4101
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:18: warning: already initialized constant Rails::Command::HELP_MAPPINGS
/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/command.rb:18: warning: previous definition of HELP_MAPPINGS was here
Run options: --seed 63669

# Running:

Run options: --seed 63669

# Running:

FF

Failure:
StaticPagesControllerTest#test_should_get_help [/home/ec2-user/environment/sample_app2/test/controllers/static_pages_controller_test.rb:11]:
Expected response to be a <5XX: error>, but was a <200: OK>


/usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_should_get_help' for class `Minitest::Result' (NameError)
        from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `format_rerun_snippet'
        from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:23:in `record'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:786:in `block in record'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:785:in `each'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:785:in `record'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:334:in `run_one_method'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:321:in `block (2 levels) in run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:320:in `each'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:320:in `block in run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:360:in `on_signal'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:347:in `with_info_handler'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:319:in `run'
        from /usr/local/rvm/gems/ruby-2.4.1@global/gems/railties-5.1.4/lib/rails/test_unit/line_filtering.rb:9:in `run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `block in __run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `map'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:159:in `__run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:136:in `run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/minitest-5.11.1/lib/minitest.rb:63:in `block in autorun'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `fork'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `serve'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /usr/local/rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'

This has happened both on my own local machine and on my Cloud9 environment, even when I tried redoing the first part of chapter 3 to make sure I hadn't installed anything incorrectly. Does this issue pop up for anybody else using the tutorial?

Gemfile Final

After creating the hello_app and then editing the Gemfile as the current listing on git. I receive this error

sayth@sayth-E6410 ~/workspace/hello_app $ bundle install         [ruby-2.4.0p0]

[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: rails (~> 5.0.1) and rails (= 5.0.0.1). Bundler cannot continue.

 #  from /home/sayth/workspace/hello_app/Gemfile:23
 #  -------------------------------------------
 #  
 >  gem 'rails',        '5.0.0.1'
 #  gem 'puma',         '3.4.0'
 #  ------------------------------------------

I am on linux mint 18.1 with zsh.

For reference this is exactly what I pasted into my Gemfile and then ran bundle install on.

source 'https://rubygems.org'

gem 'rails',        '5.0.0.1'
gem 'puma',         '3.4.0'
gem 'sass-rails',   '5.0.6'
gem 'uglifier',     '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks',   '5.0.1'
gem 'jbuilder',     '2.4.1'

group :development, :test do
  gem 'sqlite3', '1.3.11'
  gem 'byebug',  '9.0.0', platform: :mri
end

group :development do
  gem 'web-console',           '3.1.1'
  gem 'listen',                '3.0.8'
  gem 'spring',                '1.7.2'
  gem 'spring-watcher-listen', '2.0.0'
end

group :production do
  gem 'pg', '0.18.4'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Heroku complains about missing gem mini_portile2

When deploying to Heroku, it complains about "mini_portile2" missing.

remote:        section: 'mini_portile2'
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.

A solution is to add this line to Gemfile, e.g. in the group :production do section:
gem 'mini_portile2', '~> 2.1'

And maybe install this gem locally:
gem install mini_portile2

Heroku deployment - App crashes due to missing 'rails_12factor' gem

Once the application is deployed to heroku, the application crashes and does not startup. After researching the log files and SO, it appears Heroku requires the following gem to be installed:

gem 'rails_12factor', '0.0.2'

After adding this to the Gemfile under the group :production do and doing a bundle install locally, I was able to push my changes to Heroku and deploy successfully. This gem should be included as part of the Heroku deployment section in the tutorial.

spring = 1.7.2 on Mac Sierra & Ruby 2.3.3

Received the following error using spring = 1.7.2
'You have requested:
spring = 1.7.2

The bundle currently has spring locked at 2.0.1.
Try running 'bundle update spring'

If you are updating multiple gems in your Gemfile at once,
try passing them all to 'bundle update''

I used 2.0.1 for the tutorial and it worked out fine.

Update 'listen' gem

The gem listen, in the gemfiles, is at 3.0.8, and the bundler threw an error that listen was not updated. I had to run bundle update listen and then bundle install --without production to run.

Could not locate Gemfile

rails 5.1.4 with the suggested gemfile updates (from online versions) returns "Could not locate Gemfile" error message.

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.