ruby gemfile 229 error - passenger

I am having another issue with Phusion Passenger. I updated my gems, I updated Bundle, I reinstalled Phusion and when I go to hit the web address it gives me. Any ideas?
Here is where I am at now..
compile error /home/bistro/openproject/Gemfile:229:
syntax error, unexpected ':', expecting $end ...
em "openproject-plugins", git: "https://github.com/opf/openp...
^ (SyntaxError) /home/bistro/openproject/Gemfile:229:in evaluate'
/usr/lib/ruby/vendor_ruby/bundler/definition.rb:17:inbuild'
/usr/lib/ruby/vendor_ruby/bundler.rb:136:in definition'
/usr/lib/ruby/vendor_ruby/bundler.rb:124:inload'
/usr/lib/ruby/vendor_ruby/bundler.rb:107:in setup'
/usr/lib/ruby/vendor_ruby/bundler/setup.rb:17
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:ingem_original_require'
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in require'
/var/lib/gems/1.8/gems/passenger-4.0.29/lib/phusion_passenger
/loader_shared_helpers.rb:219:inrun_load_path_setup_code'
/var/lib/gems/1.8/gems/passenger-4.0.29/lib/phusion_passenger
/loader_shared_helpers.rb:333:in running_bundler'
/var/lib/gems/1.8/gems/passenger-4.0.29/lib/phusion_passenger
/loader_shared_helpers.rb:217:inrun_load_path_setup_code'
/var/lib/gems/1.8/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:96:in `preload_app'
/var/lib/gems/1.8/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:153
Application root
/home/bistro/openproject Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
production Ruby interpreter command
/usr/bin/ruby1.8
User and groups
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Environment variables

You probably have a syntax error in your Gemfile.plugins file.
Also I suspect that you use ruby 1.8, and OpenProject 3.0 (at least the openproject-plugins plugin is a 3.0 plugin) - that doesn't match. Please use ruby 2.0, fetch the current openproject (and plugin) sources and try again.

Related

Ruby on Rail running apache show index of when accessing the site

I have recently updated to Apache 2.4, and I am using Ruby on Rail to run my application. Following the upgrade, the site shows a content as seen in the image below, and the error on the log file shows this error message. I have tried using the 'Bundle Install' and checked the permission but that hasn't helped. Any advice would be greatly appreciated. Thanks
[ 2022-02-07 07:47:24.5559 8104/7efc89c8f700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/adminuser/hroot: An error occured while starting up the preloader.
Error ID: ba7e6074
Error details saved to: /tmp/passenger-error-RA01E9.html
Message from application: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/gems/mysql2-0.3.14/lib/mysql2/mysql2.so (LoadError)
PassengerRuby /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/wrappers/ruby
SetEnv GEM_HOME /root/.gem/ruby/1.9.1
This error shows a problem with the shared objects. You probably updated MySQL/MariaDB libraries with Apache and new libraries are incompatible with your mysql2 gem build. The solution is simple:
First, ensure you are using the ruby-2.0.0-p353#hroot RVM environment.
Then, execute the following command:
gem install mysql2 --version 0.3.14
This should rebuild your mysql2 gem for the new MySQL/MariaDB client libraries on your system.
this isn't the answer anyway but another method to run ruby (in my case Windows 10 ; if you use another OS try to find out how to modify inside index.php the ruby starter)
i post here an alternative method to use apache + php +... and ruby
https://stackoverflow.com/a/71733656/5781320

Compatible Ruby and Cocoapods versions

I am developing a Flutter app for Android and iOS. The app is in a stable state of development on the Android simulator so I thought I would try to run it on the iOS simulator. The Flutter installation process on Macos requires installing Cocoapods. After trying to use the Macos installation of Ruby and encountering permission errors, I decided to try asdf, the latest version of Ruby (Ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin21]), and Cocoapods (1.11.2). The installation appeared to be successful, but running pod results in the following error:
Error loading the plugin cocoapods-plugins-1.0.0.
NoMethodError - undefined method activate' for #<Gem::StubSpecification:0x00007f963819f4f8 #extension_dir=nil, #full_gem_path="/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0", #gem_dir=nil, #ignored=nil, #loaded_from="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/specifications/cocoapods-plugins-1.0.0.gemspec", #data=#<Gem::StubSpecification::StubLine:0x00007f9638194850 #name="cocoapods-plugins", #version=#<Gem::Version "1.0.0">, #platform="ruby", #extensions=[], #full_name="cocoapods-plugins-1.0.0", #require_paths=["lib"]>, #name=nil, #spec=#<Gem::Specification:0x00007f96381cc278 #extension_dir=nil, #full_gem_path="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0", #gem_dir=nil, #ignored=nil, #bin_dir=nil, #cache_dir=nil, #cache_file=nil, #doc_dir=nil, #ri_dir=nil, #spec_dir=nil, #spec_file=nil, #gems_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems", #base_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0", #loaded=true, #activated=true, #loaded_from="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/specifications/cocoapods-plugins-1.0.0.gemspec", #original_platform=nil, #installed_by_version=#<Gem::Version "3.3.2">, #autorequire=nil, #date=2016-05-10 00:00:00 UTC, #description=" This CocoaPods plugin shows information about all available CocoaPods plugins\n (yes, this is very meta!).\n This CP plugin adds the \"pod plugins\" command to CocoaPods so that you can list\n all plugins (registered in the reference JSON hosted at CocoaPods/cocoapods-plugins)\n", #email=nil, #homepage="https://github.com/cocoapods/cocoapods-plugins", #name="cocoapods-plugins", #post_install_message=nil, #signing_key=nil, #summary="CocoaPods plugin which shows info about available CocoaPods plugins.", #version=#<Gem::Version "1.0.0">, #authors=["David Grandinetti", "Olivier Halligon"], #bindir="bin", #cert_chain=[], #dependencies=[<Gem::Dependency type=:runtime name="nap" requirements=">= 0">, <Gem::Dependency type=:development name="bundler" requirements="~> 1.3">, <Gem::Dependency type=:development name="rake" requirements=">= 0">], #executables=[], #extensions=[], #extra_rdoc_files=[], #files=[], #licenses=["MIT"], #metadata={}, #platform="ruby", #rdoc_options=[], #require_paths=["lib"], #required_ruby_version=#<Gem::Requirement:0x00007f96381d7b28 #requirements=[[">=", #<Gem::Version "2.0.0">]]>, #required_rubygems_version=#<Gem::Requirement:0x00007f96381d7ee8 #requirements=[[">=", #<Gem::Version "0">]]>, #requirements=[], #rubygems_version="3.3.2", #specification_version=4, #test_files=[], #new_platform="ruby", #full_name="cocoapods-plugins-1.0.0", #full_require_paths=["/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-plugins-1.0.0/lib"] cocoapods-plugins-1.0.0>, #base_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0", #gems_dir="/Users/kevin/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems", #default_gem=false, #activated=true> Did you mean? activated? /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:31:in block in load_plugins' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in map'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command/plugin_manager.rb:30:in load_plugins' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:326:in block in run'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:325:in each' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:325:in run'
/Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in run' /Users/xyz/.asdf/installs/ruby/3.0.3/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.2/bin/pod:55:in <top (required)>'
/Users/xyz/.asdf/installs/ruby/3.0.3/bin/pod:25:in load' /Users/xyz/.asdf/installs/ruby/3.0.3/bin/pod:25:in '
I do not need a fix. I just want to know versions of Ruby and Cocoapods that are compatible and allow me to make progress on developing my Flutter app on Macos.
After I posted the above issue, others encountered the same problem as reported here: https://github.com/CocoaPods/CocoaPods/issues/11134
The workaround for the problem is to use Ruby 2.7.5. After installing that version, I found Cocoapods 1.11.2 is compatible with Ruby 2.7.5.
brew install ruby#2.7
export PATH="/usr/local/opt/ruby#2.7/bin:$PATH"

When running an application under ruby 2.3.1 using the rails server command, the following error occurs: can not modify a frozen array (RuntimeError)

I have to run an application developed in Ruby on rails. ruby 2.3.1 and rails 4.2.0
When I execute the rails server command. I get the following error:
.... config / initializers / doorkeeper.rb: 75: in <top (required)>: can not modify a frozen array (RuntimeError).
Can I explain how to succeed to no longer have this error, thank you
Info :
The "bundle install" command runs successfully.
The code around doorkeepee.rb near line 75 : Doorkeeper.configuration.token_grant_types << "password"
I'm trying to understand how RAIL_ENV works. Can you help me at the same time?

Unicorn+Sinatra+Nginx | FATAL error adding listener

I have a Sinatra application hosted using Nginx and Unicorn. it went down when I upgraded the operating system (Ubuntu 14.04.5 LTS) on the server, and I was able to bring them all back up except this one, the lone Rack-based application. When I try to launch Unicorn (unicorn -c unicorn.rb -D), I get the following error:
I, [2017-08-06T15:39:54.426004 #6505] INFO -- : unlinking existing socket=/tmp/unicorn.wheels-within-wheels.sock
F, [2017-08-06T15:39:54.427777 #6505] FATAL -- : error adding listener addr=/tmp/unicorn.wheels-within-wheels.sock
/home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `unlink': Operation not permitted # unlink_internal - /tmp/unicorn.wheels-within-wheels.sock (Errno::EPERM)
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:107:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:231:in `li$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bl$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `ea$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bi$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:130:in `st$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `<main>'
Anyone have an idea on how to fix this? Thanks.
It's fixed after I performed the following two steps:
As described in this Server Fault answer, I changed the group of the application owner, 'deployer', from 'deployer' to 'staff'.
I changed the owner of the socket file to deployer:staff (sudo chown deployer:staff /tmp/unicorn.wheels-within-wheels.sock).
Then I ran bundle update to update the gems, and finally Unicorn ran successfully and the application was live again.
The following link said that kind of problem is occured upgrading MacOSX to El Capitan. if you can follow the same path, maybe you could resolve the problem.
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted

Ruby Rspec outputs literal escape characters on windows

I'm following the ruby on rails tutorial: http://railstutorial.org/chapters/static-pages#top
I'm up to using rspec. Having installed the win32console gem, it outputs gibberish in the console, i assume it is outputting the ansi colour change codes:
>rspec spec/
?[31mF?[0m?[31mF?[0m
Finished in 0.34376 seconds
?[31m2 examples, 2 failures?[0m
1) PagesController GET 'home' should be successful
Failure/Error: Unable to find C to read failed line
?[31mundefined method `get' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x22294e0>?[0m
?[90m # ./spec/controllers/pages_controller_spec.rb:7:in `block (3 levels) in <top (required)>'?[0m
2) PagesController GET 'contact' should be successful
Failure/Error: Unable to find C to read failed line
?[31mundefined method `get' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_2:0x2173d28>?[0m
?[90m # ./spec/controllers/pages_controller_spec.rb:14:in `block (3 levels) in <top (required)>'?[0m
Any tips how to fix this?
Ansicon works a treat!
http://adoxa.110mb.com/ansicon/index.html
Download, extract it somewhere, and do:
ansicon -i
Then close/reopen the command prompt. Sweet!
There was a bug in beta releases of RSpec 2. If you upgrade to latest you should now see colors if you have win32console installed.
See this: http://github.com/rspec/rspec-core/issuesearch?state=closed&q=color#issue/143
UPDATE: Keep an eye on this thread:
http://groups.google.com/group/rubyinstaller/browse_thread/thread/2d2a62db7281509a/?pli=1
Update:
Rspec is still very buggy with windows coloring, especially if you're trying to use it with Autotest and/or Spork.
If you are still seeing escape codes, a quick hack is to edit the following file (exact path will depend on your version of RSpec)
%RUBY_HOME%\lib\ruby\gems\1.9.1\gems\rspec-core-2.0.1\bin\rspec
And add the following line
require 'win32console'

Resources