Git Product home page Git Product logo

acm's Issues

`rescue in <top (required)>': no such file to load -- net/https.

Occured when running: $rails server

lane@lane-UL30A:~/workspace/acm/acm$ rails s
/home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/rest-client-1.6.7/lib/restclient.rb:9:in `rescue in ': no such file to load -- net/https. Try running apt-get install libopenssl-ruby (LoadError)
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/rest-client-1.6.7/lib/restclient.rb:5:in `'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/rest-client-1.6.7/lib/rest_client.rb:2:in `'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/heroku-2.14.0/lib/heroku/client.rb:2:in `'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/heroku-2.14.0/lib/heroku.rb:6:in `'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
    from /home/lane/workspace/acm/acm/config/application.rb:7:in `'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/railties-3.1.1/lib/rails/commands.rb:52:in `require'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/railties-3.1.1/lib/rails/commands.rb:52:in `block in '
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap'
    from /home/lane/.rvm/gems/ruby-1.9.2-p290@acm/gems/railties-3.1.1/lib/rails/commands.rb:49:in `'
    from script/rails:6:in `require'
    from script/rails:6:in `'

RuntimeError in PostsController#create

Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id

**
Happened when I tried to create a post on the forum.

Anonymous users can create posts + @current_user.id throws error

Lane brought up an issue where anonymous (not logged in) users are allowed to see the create new post form, which will throw up an error on submit due to the line @post.user_id = @current_user.id. A solution would be to modify app/models/ability.rb so that only logged in users can create posts, whereas everybody can read them. I put in a method skeleton for user.logged_in? but wasn't able to implement it.

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.