Damian Nelwep

Joined

3,190 Experience
0 Lessons Completed
3 Questions Solved

Activity

Posted in Having some Issues regarding Rails 5.2 upgrade

Yes I did that of course...

Posted in Having some Issues regarding Rails 5.2 upgrade

Hi everyone,

I was working on using ActiveStorage on an app I had begun like 6month to 1year ago. So Rails wasn't the right version and I put 'gem 'rails', '~> 5.2', '>= 5.2.2' ' in my Gemfile and then 'bundle install rails' to upgrade it and be able to use the new Storage function.

But when I type rails s (db:migrate worked well) , I have some error which seem to be connected to the fact I upgraded rails.. :

/home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `action_storage' for #<Rails::Application::Configuration:0x000055e7bdaaed30> (NoMethodError)

This is the last line. Before it there is :

$ rails s
=> Booting Puma
=> Rails 5.2.2 application starting in development 
=> Run `rails server -h` for more startup options
Exiting
Traceback (most recent call last):
    70: from bin/rails:3:in `<main>'
    69: from bin/rails:3:in `load'
    68: from /home/meaw/work/tryfour/meaw/bin/spring:15:in `<top (required)>'
    67: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
    66: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
    65: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    64: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    63: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    62: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
    61: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    60: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
    59: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
    58: from /home/meaw/work/tryfour/meaw/bin/rails:9:in `<top (required)>'
    57: from /home/meaw/work/tryfour/meaw/bin/rails:9:in `require'
    56: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<top (required)>'
    55: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:46:in `invoke'
    54: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/command/base.rb:65:in `perform'
    53: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    52: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
    51: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
    50: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:142:in `perform'
    49: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:142:in `tap'
    48: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:147:in `block in perform'
    47: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:51:in `start'
    46: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout'
    45: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/server.rb:354:in `wrapped_app'
    44: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:27:in `app'
    43: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/server.rb:219:in `app'
    42: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/server.rb:319:in `build_app_and_options_from_config'
    41: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:40:in `parse_file'
    40: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
    39: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
    38: from config.ru:in `<main>'
    37: from config.ru:in `new'
    36: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
    35: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
    34: from config.ru:3:in `block in <main>'
    33: from config.ru:3:in `require_relative'
    32: from /home/meaw/work/tryfour/meaw/config/environment.rb:5:in `<top (required)>'
    31: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
    30: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
    29: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
    28: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
    27: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
    26: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `call'
    25: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:in `each'
    24: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
    23: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from'
    22: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:415:in `call'
    21: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `tsort_each_child'
    20: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `each'
    19: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
    18: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
    17: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
    16: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    15: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
    14: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
    13: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
    12: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
    11: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:601:in `block in <class:Engine>'
    10: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:601:in `each'
     9: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/engine.rb:602:in `block (2 levels) in <class:Engine>'
     8: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
     7: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
     6: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
     5: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
     4: from /home/meaw/work/tryfour/meaw/config/environments/development.rb:1:in `<top (required)>'
     3: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/railtie.rb:216:in `configure'
     2: from /home/meaw/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/railtie.rb:216:in `instance_eval'
     1: from /home/meaw/work/tryfour/meaw/config/environments/development.rb:29:in `block in <top (required)>'

So I don't know how to debug this without going back to the earlier rails version I was working on....

Thanks in advance to the kind person who would come to help me!

Posted in Is it better to switch from scratch to Devise ?

Hi everyone,

I'm working on a project since some time now and made up some authentication system from scratch thanks to Michael Hartl among other resources... I was just thinking about the idea to use Devise instead, to make it even more powerful but I'm not sure that it would be so helpful.

Can somebody tell me what is the real power and use of Devise and what does it bring the most.

Thank you,
wishing you a great day

At first I put 'localhost:5000' and then 'lvh.me:5000' which return to me :

LoadError in PostsController#create
Unable to autoload constant ActiveStorage::Blob::Analyzable, expected /home/meaw/.rvm/gems/ruby-2.5.1/gems/activestorage-5.2.2/app/models/active_storage/blob/analyzable.rb to define it

But I guess this is because of the subdomain's mecanics that is going on...
So in storage.yml, what should I put for the host: option..?

I got some issue when I try to create a new post following your instructions.

ArgumentError in PostsController#create
Cannot load `Rails.config.active_storage.service`: unknown keyword: host

Ok thank you I'll get to the ressources you provide and I'm sure I'll find what I want. In the end I'll just delete everything about paperclip in the end since it doens't seem at all like the best way to do what I want. The easier the better :) thanks again !

Posted in How do I create my homepage subdomain ('www')

Thank you again this is perfectly what I needed. You're the best teacher I could ever dream of but I hope I don't bother you so much with my issues... By the way I think I would be interested in your hosting service but I'll ask you about it later, now is not the time. Hope you're having a good day :)

Hi everyone,

I'm asking this question because it seems pretty hard to setup, between Image Magick and all the mecanics there is to put to work... I saw there was another solution Carrierwave but which seems as I read harder to install.

So in the end I tend to think it could be better to choose something simpler like Gravatar, except that the app I'm working on consists on people exposing portfolios with photos among other things... So anyways I will have to get a gem that permit uploading files on the user profiles...

Which solution do you suggest me the best, eventually the easiest possible but most of all, a working one.

Thank you in advance for your time and hoping you're having a good day

Thank you very much :)

(just put the h before the rest and you'll get to the message...) I'm sorry I don't understand why but apparently I can't put any url in my message without having it not displayed.
Thank you and wishing you a sweet day

ttp://damwork.com/wp-content/uploads/2019/01/js_error.txt

well I can't paste what I copy on clipboard so I'll put a link to a file / page

I don't know why but I can't answer to this..

Posted in How do I create my homepage subdomain ('www')

I get 'example.domain.com/home' instead of 'domain.com/home' or 'www.domain.com/home'

Posted in How do I create my homepage subdomain ('www')

I only have a last issue which is that when I'm in a subdomain and I get to 'home', the subdomain still appear in the url whereas I want 'www' or nil.. :s

I'm having some trouble setting up Paperclip gem to setup profile pictures for the users of my app and I need to access users_controller. Since I'm using Devise, I don't really know where I can find it and I guess it's not a really good idea to create users_controller.rb since it may surely get to some conflicts so where should I go to solve this ? It took some time for me to find a way but without success I'll keep on searching anyways. Wishing you a good day/night and thank you so much for the support...

Posted in How do I create my homepage subdomain ('www')

Sorry in fact I just had to restart the server and now it works perfectly thank you so much...

Posted in How do I create my homepage subdomain ('www')

I also get
"
Routing Error
No route matches [GET] "/"
"
:s

Posted in How do I create my homepage subdomain ('www')

Thank you but I get an error

"
NameError
uninitialized constant AccountSubdomain
"

Is it normal that I had to create the directory lib/ in the app/ folder ?