Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RubyonRails找不到初始值设定项? 我将此交叉发布到Serverfault,但不幸的是,我不确定这是否与开发或服务器相关=(_Ruby On Rails_Apache_Ubuntu - Fatal编程技术网

Ruby on rails RubyonRails找不到初始值设定项? 我将此交叉发布到Serverfault,但不幸的是,我不确定这是否与开发或服务器相关=(

Ruby on rails RubyonRails找不到初始值设定项? 我将此交叉发布到Serverfault,但不幸的是,我不确定这是否与开发或服务器相关=(,ruby-on-rails,apache,ubuntu,Ruby On Rails,Apache,Ubuntu,您好,我正在尝试使用Passenger 2.2.15、Rails 2.3.5、Ruby 1.8.7和Apache 2.2.14将一个应用程序部署到新的Ubuntu 10安装中。但是,即使使用默认的Rails应用程序(sudo Rails defaultapp),我也收到以下错误:“没有这样的文件要加载--初始化器” 我不确定您可能需要哪些文件的副本来诊断此问题,因此我将在这里复制一些文件,希望它能有所帮助 谢谢你能提供的帮助 -RM /etc/apache2/sites available/de

您好,我正在尝试使用Passenger 2.2.15、Rails 2.3.5、Ruby 1.8.7和Apache 2.2.14将一个应用程序部署到新的Ubuntu 10安装中。但是,即使使用默认的Rails应用程序(
sudo Rails defaultapp
),我也收到以下错误:“没有这样的文件要加载--初始化器”

我不确定您可能需要哪些文件的副本来诊断此问题,因此我将在这里复制一些文件,希望它能有所帮助

谢谢你能提供的帮助

-RM

/etc/apache2/sites available/default

    <VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/appname/public
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>



    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Rails没有安装到/appname/vendor/Rails中,我是通过运行sudo-rake-Rails:freeze:edge-RELEASE=2.3.5,然后相应地更改权限来安装它的。Ubuntu要求sudo使用Rails做所有事情,因此需要不断的权限操作,这令人不安


此外,这还导致另一个错误:无法为[]激活机架(=1.2.1,运行时),已为[]激活机架-1.0.1,我仍在工作。

我将/appname/vendor/rails/actionpack/lib/action\u controller.rb中的行
gem'rack'、'~>1.0.1'
更改为
gem'rack'、'~>1.2.1'
<IfModule passenger_module>
   PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15
   PassengerRuby /usr/bin/ruby1.8
</IfModule>
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so