Hi Radhames,
running webrick (3000) on the server is fine, app loads.
doing bundle show rails gives:
/home/railsuser/.rvm/gems/ruby-2.3.1@my_gemset/gems/rails-4.1.6
but when i run nginx with staging or production gives me the same error
(method not found aka ( i guess) gems not loaded)
so question is how do i tell rvm // bundler / passenger where my gems are?
ps: gem file
i took all the stages out and listed the gems only
recipe:
require 'capistrano/rvm'
require "whenever/capistrano"
#require "bundler/capistrano"
#require "rvm/capistrano" # Load RVM's capistrano plugin. OLD
set :stages, ["staging", "production"]
set :default_stage, "staging"
set :rbenv_ruby, '2.2.4'
set :rvm_type, :user #system #; user ; system = rvm system wide install
set :application, 'appname'
set :bundle_binstubs, nil
set :scm, :git
set :repo_url, "railsuser@SOMEIP:/gitrepos/my_repo.git"
set :ssh_options, {:forward_agent => true}
set :keep_releases, 5
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle
public/system}
SSHKit.config.command_map[:rake] = "bundle exec rake" #8
SSHKit.config.command_map[:rails] = "bundle exec rails"
set :pty, true
set :format, :pretty
set :tmp_dir, "/home/username/tmp"
#set the user on our server that we want Capistrano to run commands with:
set :user, "username"
thx
On Wed, Jun 29, 2016 at 12:37 PM, radhames brito <[email protected]> wrote:
> You have to check the scope of the gems you are using, since you are using
> bundle exec, bundler will only load the gems you have not specified in the
> given environment, in this case staging, so if you have something like this
>
> group :test, :development, :staging do
>
> gems in that group only load in the specific environment, so if you have a
> something like this
>
> group :test, :development do
> gem 'foo'
>
> Foo will not load in staging environment.
>
> Another thing is that is you are using capistrano/bundler, gems are not in
> stalled in the system or $GEMHOME, they are in
> shared/bundle/ruby/RUBY_VERSION/gems, so they might not show up when you do
> gems list outside the current folder. Pay attention to your capistrano
> recipe.rb so check how you are loading the application.
>
> Please provide more details about your Gemfile, and your capistrano
> recipe.rb to be able to help you more.
>
> On Wed, Jun 29, 2016 at 12:18 PM, tom <[email protected]> wrote:
>
>> hi,
>>
>> im trying to deploy an app via cap3/bundler/rvm on debian , user-rvm
>>
>> i go the app-code on the server, but when i test it via:
>> bundle exec rails s -b 0.0.0.0 -p 3000 -e staging
>>
>> it throws an error that a method is missing.
>>
>> gem list shows all gems , i have tried to install gems via bundle install
>> ( --system & path vendor/plugins)
>>
>> where is my problem??? what should i do?
>>
>>
>> thx for any pointers
>>
>> ps the app runs just fine locally
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMdSb2peZ2fZ07qV868msmSKOVZ551v-kGcoWt8ciwtKbQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMdSb2peZ2fZ07qV868msmSKOVZ551v-kGcoWt8ciwtKbQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/CANkJ5g%3DCxCJV1%2BqJa%3D-g4BvCqMVN5WtsAo6RjJbuTy%3DrN8rG3A%40mail.gmail.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/CANkJ5g%3DCxCJV1%2BqJa%3D-g4BvCqMVN5WtsAo6RjJbuTy%3DrN8rG3A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMeeGR-%2BoH%3Dd7j90d1mA2BpW9-Y3ocggb61h_458SxFw1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.