Damian Nelwep

Joined

3,190 Experience
0 Lessons Completed
3 Questions Solved

Activity

Posted in Issue with bootstrap sprockets in application.js

Thank you very much for the tip.

At first I tried to put "gem 'bootstrap-sass', '~> 2.3.2.2'" in the Gemfile and it turned out I got no error message but big display problems, mainly in the menu.

So I finally changed the Gemfile version to "gem 'bootstrap-sass', '~> 3.4', '>= 3.4.1'" and put back '//= require bootstrap-sprockets' in application.js and now it works perfectly :)

This is because I struggle installing some gems like social_stream. And now I'm trying to install mailboxer. Would you know a good gem for messaging/social purpose ?

Anyways thank you for your advice which has been a very good help for me :) Have a nice day mate

Posted in Issue with bootstrap sprockets in application.js

Hello,

As said in the title, I get an error message when I try to access my localhost:3000.

The message is :


Sprockets::FileNotFound in Welcome#index

Showing /home/dameaw/work/five/meawinit/app/views/layouts/application.html.erb where line #8 raised:

couldn't find file 'bootstrap-sprockets' with type 'application/javascript'
Checked in these paths: 
  /home/dameaw/work/five/meawinit/app/assets/config
  /home/dameaw/work/five/meawinit/app/assets/images
  /home/dameaw/work/five/meawinit/app/assets/javascripts
  /home/dameaw/work/five/meawinit/app/assets/stylesheets
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/coffee-rails-4.2.2/lib/assets/javascripts
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/jquery-rails-4.3.5/vendor/assets/javascripts
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/toastr-rails-1.0.3/vendor/assets/javascripts
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/toastr-rails-1.0.3/vendor/assets/stylesheets
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/images
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/javascripts
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootstrap-sass-2.3.2.2/vendor/assets/stylesheets
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/actioncable-5.1.7/lib/assets/compiled
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/actionview-5.1.7/lib/assets/compiled
  /home/dameaw/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/turbolinks-source-5.2.0/lib/assets/javascripts

I try to get rid of '//= require bootstrap-sprockets' in the application.js file but when I do that, the style is completly broken.

Thank you for your advices in advances and have a sweet day :)

Hi everyone,

I'm having an issue after changing the name in a "Relationship" Controller and Model (the name is "follow / unfollow" and before was "meaw / unmeaw" (which I endend founding pretty bad and got back to something more classic). I also changed it in the database and many other places, but PostGres displays an error message as follow :

PG::UndefinedColumn: ERROR:  column relationships.meawed_id does not exist
LINE 1: ...users"."id" = "relationships"."follower_id" WHERE "relations...
                                                             ^
: SELECT  1 AS one FROM "users" INNER JOIN "relationships" ON "users"."id" = "relationships"."follower_id" WHERE "relationships"."meawed_id" = $1 LIMIT $2

I wonder if I have to take care of this with another migration or directly using PG interface... The problem is that I don't remember the password or how to authenticate. I thought it might be better to reset the database.

Thank you so much in advance for your advice

Posted in Bundler And PG Error On Deployment

On my deploy server I get Bundler version 2.0.2 whereas the version on my local machine is Bundler version 1.17.3 . How can I downgrade the server version ? I already tried some things before but without much success...

About rails, I'm not trying to upgrade it so I really don't get why it is displaying this error message... Anyway do you think it would be a good idea to upgrade rails ? Also upgrade bundler on my local machine would seem to be a good solution ?

Posted in Bundler And PG Error On Deployment

Yes rbenv and no rvm installed ! Trying what you told me... and I get this error message when deploying :

01 You are trying to install in deployment mode after changing
      01 your Gemfile. Run `bundle install` elsewhere and add the
      01 updated Gemfile.lock to version control.
      01
      01 Bundler is unlocking ruby
      01
      01 You have added to the Gemfile:
      01 * source: git://github.com/rails/rails.git (at master)
      01 * rails
      01
      01 You have deleted from the Gemfile:
      01 * rails (~> 5.1.6)

Anyway thanks for the tip I don't get the same message as before

Posted in Bundler And PG Error On Deployment

Hello Seth, I just saw your answer.

First of all thank you for taking some time to help me.

I did gem update --system on me local machine and my deploy server as well
I put in the Gemfile ruby "2.6.1" and also ruby-2-6-1 but when I type ruby -v I get
rbenv: version "ruby-2-6-1" is not installed

About Postgres, it says what it should, and is active.

Thank you

Posted in Bundler And PG Error On Deployment

I've done it but nothing have changed and I get the same error messages .. :(

gem update

isn't it ?

Posted in Bundler And PG Error On Deployment

No I've just replaced it myself but it display it correctly !

Don't you think I have to setup bundle properly ?

Posted in Bundler And PG Error On Deployment

Hi, I followed every step of the deployment but when I get to 'cap production deploy', some errors appear :

01 /home/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:319:in `check_for_activated_spec!'
      01 :
      01 You have already activated bundler 1.17.2, but your Gemfile requires bundler 1.17.3. Since bundler is a default gem, you can either remove your depeā€¦
      01  (
      01 Gem::LoadError
      01 )

It seems like I have a conflict between bundler versions. I tried many things but not one seems to work fine.

Also I get some errors about PostGres connection. If someone could tell me where this can come from, It'd really help!

01 rake aborted!
      01 PG::ConnectionBad: could not connect to server: Connection timed out
      01    Is the server running on host "1.2.3.4" and accepting
      01    TCP/IP connections on port 5432?
      01 /home/deploy/meaw/shared/bundle/ruby/2.6.0/gems/pg-0.18.4/lib/pg.rb:45:in `initialize'
      01 /home/deploy/meaw/shared/bundle/ruby/2.6.0/gems/pg-0.18.4/lib/pg.rb:45:in `new'
      01 /home/deploy/meaw/shared/bundle/ruby/2.6.0/gems/pg-0.18.4/lib/pg.rb:45:in `connect'

Thank you very much in advance and have a sweet day :)

Posted in How do I update Ruby/Rails ?

Hello,
I have a project running with ruby v 2.6.1 and I would like it to work with 2.6.3 .
How do I upgrade ruby and rails versions?
Thank you

Posted in Issues Deploying Rails App

I don't know why I paid to get here because nobody answers me and also the only video I needed to see is free to watch for anyone on YouTube... Please tell me what advantages do I really get from this subscription?

Hi I'm having the same issue and would be glad to hear some answer about it to...!

Posted in Issues Deploying Rails App

Also on the server side I tried to do rbenv install 2.6.1 and I got :

Downloading ruby-2.6.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.1.tar.bz2
Installing ruby-2.6.1...

BUILD FAILED (Ubuntu 18.04 using ruby-build 20190615-1-g0867187)

Inspect or clean up the working tree at /tmp/ruby-build.20190622035254.7560
Results logged to /tmp/ruby-build.20190622035254.7560.log

Last 10 log lines:
 92% [1013/1091]  lib/webrick/httpservlet/filehandler.rb
 92% [1014/1091]  lib/webrick/httpservlet/prochandler.rb
 93% [1015/1091]  lib/webrick/httpstatus.rb
 93% [1016/1091]  lib/webrick/httputils.rb
 93% [1017/1091]  lib/webrick/httpversion.rb
 93% [1018/1091]  lib/webrick/log.rb
 93% [1019/1091]  lib/webrick/server.rb
Killed
uncommon.mk:545: recipe for target 'rdoc' failed
make: *** [rdoc] Error 137

Posted in Issues Deploying Rails App

Thank you if you get some time to take a look... I was on rvm but uninstalled it and put rbenv.
I'm so frustrated since I got so close..! ^

Posted in Issues Deploying Rails App

I finally tried to do it with your tutorial but I'm blocked at some point, just when I type cap production deploy


#<Thread:0x00005559861bdae8@/home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    12: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
    11: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
    10: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
     9: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/capistrano-rbenv-2.1.4/lib/capistrano/tasks/rbenv.rake:10:in `block (3 levels) in <top (required)>'
     8: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:59:in `test'
     7: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
     6: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `tap'
     5: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
     4: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:129:in `execute_command'
     3: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:176:in `with_ssh'
     2: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/connection_pool.rb:63:in `with'
     1: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/backends/connection_pool.rb:63:in `call'
/home/dameaw/.rvm/gems/ruby-2.6.1/gems/net-ssh-5.2.0/lib/net/ssh.rb:263:in `start': Authentication failed for user ubuntu@35.180.18.78 (Net::SSH::AuthenticationFailed)
    1: from /home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/home/dameaw/.rvm/gems/ruby-2.6.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as ubuntu@35.180.18.78: Authentication failed for user ubuntu@35.180.18.78 (SSHKit::Runner::ExecuteError)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ubuntu@35.180.18.78: Authentication failed for user ubuntu@35.180.18.78


Caused by:
Net::SSH::AuthenticationFailed: Authentication failed for user ubuntu@35.180.18.78

Tasks: TOP => rbenv:validate
(See full trace by running task with --trace)

Posted in Issues Deploying Rails App

Hi there,

I'd like to deploy my app and I followed a long tutorial (not the GoRails one badly :( ) but I managed to put it on the server and running with Capistrano. DB is postgre and OS is Debian (is this a problem and better get on Ubuntu..?). I get the error message "An unhandled lowlevel error occurred. The application logs may have details." Where could it come from?

Thank you and have a good night/day :)

Ok so the best thing to do may be to remove any trace of rbenv ..?

In the end the main problem was just because I used an other Terminal version (Terminator in place of the classic one) but anyways I don't know if this is a 'normal' issue...

Posted in How do I update Rails to 5.2 without having any issue ?

Everything is in the title, except the current version I'm working on :

gem 'rails', '~> 5.1.6'

Thank you for your help

By the way I also tried

gem update bundler
Updating installed gems
Updating bundler
Fetching: bundler-2.0.1.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.5.0 directory.

I could do sudo but I think it's not normal that I have to do it this way...

Hello everyone,
I'm having some issue I really don't know why... It is the second time I get this but, after working on a Rails project without any problem, I try to get back to it and it tells me :

Command 'rails' not found, but can be installed with:

sudo apt install ruby-railties

But I installed Rails already and as I said, it worked perfectly... So anyone could help and tell me how and why this could happend.

Thank you