Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.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 Linux和Ubuntu的Fedena安装_Ruby On Rails_Ruby_Ruby On Rails 3_Rubygems_Gem - Fatal编程技术网

Ruby on rails Linux和Ubuntu的Fedena安装

Ruby on rails Linux和Ubuntu的Fedena安装,ruby-on-rails,ruby,ruby-on-rails-3,rubygems,gem,Ruby On Rails,Ruby,Ruby On Rails 3,Rubygems,Gem,我是ruby on rails新手。在执行rake db:create时,我遇到了以下错误。问题是什么。我发现这是一个常见问题,并用谷歌搜索了它。我发现要更改rake版本,但我的问题没有解决 rake aborted! ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead. /usr/local/lib/ruby/gems/2.1

我是ruby on rails新手。在执行
rake db:create
时,我遇到了以下错误。问题是什么。我发现这是一个常见问题,并用谷歌搜索了它。我发现要更改rake版本,但我的问题没有解决

rake aborted!
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/rdoctask.rb:1:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/sathees/kits/fedena/fedena-v2.3-bundle-linux/Rakefile:8:in `<top (required)>'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/usr/local/bin/rake:33:in `<main>'

在Linux中安装Fedena

1.1 Installing RVM

1. sudo gem install rvm

2. Put this lines in your .bash_profile or .bashrc:

if [[ -s $HOME/.rvm/scripts/rvm ]] ; then
        source $HOME/.rvm/scripts/rvm
fi

1.2  Installing ruby inside your rvm
1. rvm install 1.8.7

1.3 - Setting up rvm to use your specific ruby version

1. rvm use 1.8.7 –default

1.4 - Installing rails 2.3.5

1. Create the gemset:rvm gemset create rails2
2.Setting up rvm to use always this gemset:
rvm use 1.8.7@rails2 –default
3.gem install rails -v 2.3.5

1.5 Setup your database details in the database.yml

1.6 Install the rest of the gems
1. gem install declarative_authorization -v 0.5.1
2. gem install i18n -v 0.4.2
3. gem install bundler

1.7 Downgrade your rake version to 10.1.0 to rake, version 0.9.2
1. gem uninstall rake -v 10.1.0
2. gem install rake -v 0.9.2

1.8 Update your Bundler 
1. bundle install

1.9 Install missing gems using gem install command:

gem install -v version no
Required gems 
gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
atomic (1.1.14)
bundler-unload (1.0.2)
declarative_authorization (0.5.1)
executable-hooks (1.3.1)
fattr (2.2.1)
gem-wrappers (1.2.4)
i18n (0.4.2)
json (1.8.1)
minitest (4.7.5)
multi_json (1.8.4)
mysql (2.8.1)
pkg-config (1.1.5)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2, 0.8.7)
rdoc (4.1.1)
rubygems-bundler (1.4.2)

rush (0.6.8)
rvm (1.11.3.8)
session (3.1.0)
test-unit (2.5.5)
thread_safe (0.1.3)
tzinfo (0.3.38)

1.10 Update your Bundler 
bundle install

1.11 :Edit your rake file from fedena project
vi fedena-v2.3-bundle-linux/Rakefile
Replace require 'rake/rdoctask' to require 'rdoc/task'

1.12 :Downgrade Your gem latest version to 1.3.7
gem update --system 1.3.7

1.13 :Now there will be a bundler conflict(latest version of gem and gem version 1.3.7) you should solve this using uninstalling bundler
Uninstalling bundler
rvm @global
gem list -d bundler1.5.2
rvm gemset use global && gem install bundler
bundle install
gem uninstall bundler(Uninstall all bundler which are installed)

1.14 Set up Fedena databases

From the Fedena source directory in terminal run, "rake db:create" followed by, "rake fedena:plugins:install_all" 

1.15 Change permissions for scripts

From the same directory grant executable permissions for the files in script directory by,
"chmod +x script/*" 

1.16 Run the inbuilt server

If everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,
"script/server"

1.17 Finally, run the command "script/server".
This would start the server and it will be accessible at http://localhost:3000 
2在Ubuntu中安装Fedena

2.1 Setting up the Rails development environment

Ruby, rubygems, rails and other required packages can be installed by :
sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
cd /usr/local/src
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar xzvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1 
sudo gem install rails -v 2.3.5
2.2 Setting up MySQL server

Fedena uses mysql, so run,
"sudo apt-get install libmysqlclient-dev mysql-server"
Do remember the mysql password you set during this step, it is required in step five.

2.3.Download the latest Fedena source code from github

Download Fedena source code from GitHub. Extract the downloaded .zip archive to a convenient location where you would be running fedena . Let us say we extracted it to a directory named fedena in my home(~) directory.

2.4.Setup your database details in the database.yml

Open the file database.yml in the config folder of the fedena soucre. Change the following details:
database: fedena - The name of the database you want to use for fedena
username: root - Mysql username for fedena
password: mypass - The password for the above mysql user 



2.5.Install the rest of the gems

"gem install declarative_authorization -v 0.5.1" 
"gem install i18n -v 0.4.2" 

2.6 Downgrade your rake version to 10.1.0 to rake, version 0.9.2
3. gem uninstall rake -v 10.1.0
4. gem install rake -v 0.9.2

2.7 Edit your rake file from fedena project
vi fedena-v2.3-bundle-linux/Rakefile
Replace require 'rake/rdoctask' to require 'rdoc/task'

2.8. Set up Fedena databases 

From the Fedena source directory in terminal run, "rake db:create" followed by, "rake fedena:plugins:install_all" 

2.9 Change permissions for scripts

From the same directory grant executable permissions for the files in script directory by,
"chmod +x script/*" 

2.10 Run the inbuilt server

If everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,
"script/server"

只需将rake从10.x.x降级到1.8.7

以下是您如何做到这一点:

  • 宝石卸载耙

  • gem安装耙-v=1.8.7

  • 这里有一个完整的Fedena安装公会:


    在您的应用程序文件夹中,文件“Rakefile”的代码为:require orted!错误:“rake/rdoctask”,因此必须将其替换为require“rdoc/task”。如果仍然存在问题,请告诉我。是的,我已经尝试过,并且正在获取问题中发布的错误。这意味着rake任务问题已解决,这里还有另一个问题,您可以通过@Neelesh解决。谢谢,我将尝试解决它。您必须转到应用程序目录,通过命令$rvm use runyversion选择ruby版本(runyversion仅适用于exm您必须通过$rvm列表获得它),然后创建新的gemset$rvm gemset创建myapp并选择gemset by$rvm gemset使用myapp用于我的案例,现在运行$bundle。所有这些都将起作用。我希望
    1.1 Installing RVM
    
    1. sudo gem install rvm
    
    2. Put this lines in your .bash_profile or .bashrc:
    
    if [[ -s $HOME/.rvm/scripts/rvm ]] ; then
            source $HOME/.rvm/scripts/rvm
    fi
    
    1.2  Installing ruby inside your rvm
    1. rvm install 1.8.7
    
    1.3 - Setting up rvm to use your specific ruby version
    
    1. rvm use 1.8.7 –default
    
    1.4 - Installing rails 2.3.5
    
    1. Create the gemset:rvm gemset create rails2
    2.Setting up rvm to use always this gemset:
    rvm use 1.8.7@rails2 –default
    3.gem install rails -v 2.3.5
    
    1.5 Setup your database details in the database.yml
    
    1.6 Install the rest of the gems
    1. gem install declarative_authorization -v 0.5.1
    2. gem install i18n -v 0.4.2
    3. gem install bundler
    
    1.7 Downgrade your rake version to 10.1.0 to rake, version 0.9.2
    1. gem uninstall rake -v 10.1.0
    2. gem install rake -v 0.9.2
    
    1.8 Update your Bundler 
    1. bundle install
    
    1.9 Install missing gems using gem install command:
    
    gem install -v version no
    Required gems 
    gem list
    
    *** LOCAL GEMS ***
    
    actionmailer (2.3.5)
    actionpack (2.3.5)
    activerecord (2.3.5)
    activeresource (2.3.5)
    activesupport (2.3.5)
    atomic (1.1.14)
    bundler-unload (1.0.2)
    declarative_authorization (0.5.1)
    executable-hooks (1.3.1)
    fattr (2.2.1)
    gem-wrappers (1.2.4)
    i18n (0.4.2)
    json (1.8.1)
    minitest (4.7.5)
    multi_json (1.8.4)
    mysql (2.8.1)
    pkg-config (1.1.5)
    rack (1.0.1)
    rails (2.3.5)
    rake (0.9.2, 0.8.7)
    rdoc (4.1.1)
    rubygems-bundler (1.4.2)
    
    rush (0.6.8)
    rvm (1.11.3.8)
    session (3.1.0)
    test-unit (2.5.5)
    thread_safe (0.1.3)
    tzinfo (0.3.38)
    
    1.10 Update your Bundler 
    bundle install
    
    1.11 :Edit your rake file from fedena project
    vi fedena-v2.3-bundle-linux/Rakefile
    Replace require 'rake/rdoctask' to require 'rdoc/task'
    
    1.12 :Downgrade Your gem latest version to 1.3.7
    gem update --system 1.3.7
    
    1.13 :Now there will be a bundler conflict(latest version of gem and gem version 1.3.7) you should solve this using uninstalling bundler
    Uninstalling bundler
    rvm @global
    gem list -d bundler1.5.2
    rvm gemset use global && gem install bundler
    bundle install
    gem uninstall bundler(Uninstall all bundler which are installed)
    
    1.14 Set up Fedena databases
    
    From the Fedena source directory in terminal run, "rake db:create" followed by, "rake fedena:plugins:install_all" 
    
    1.15 Change permissions for scripts
    
    From the same directory grant executable permissions for the files in script directory by,
    "chmod +x script/*" 
    
    1.16 Run the inbuilt server
    
    If everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,
    "script/server"
    
    1.17 Finally, run the command "script/server".
    This would start the server and it will be accessible at http://localhost:3000 
    
    2.1 Setting up the Rails development environment
    
    Ruby, rubygems, rails and other required packages can be installed by :
    sudo apt-get install irb libopenssl-ruby libreadline-ruby rdoc ri ruby ruby-dev
    cd /usr/local/src
    wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
    tar xzvf rubygems-1.3.7.tgz
    cd rubygems-1.3.7
    sudo ruby setup.rb
    sudo update-alternatives --install /usr/bin/gem gem /usr/bin/gem1.8 1 
    sudo gem install rails -v 2.3.5
    2.2 Setting up MySQL server
    
    Fedena uses mysql, so run,
    "sudo apt-get install libmysqlclient-dev mysql-server"
    Do remember the mysql password you set during this step, it is required in step five.
    
    2.3.Download the latest Fedena source code from github
    
    Download Fedena source code from GitHub. Extract the downloaded .zip archive to a convenient location where you would be running fedena . Let us say we extracted it to a directory named fedena in my home(~) directory.
    
    2.4.Setup your database details in the database.yml
    
    Open the file database.yml in the config folder of the fedena soucre. Change the following details:
    database: fedena - The name of the database you want to use for fedena
    username: root - Mysql username for fedena
    password: mypass - The password for the above mysql user 
    
    
    
    2.5.Install the rest of the gems
    
    "gem install declarative_authorization -v 0.5.1" 
    "gem install i18n -v 0.4.2" 
    
    2.6 Downgrade your rake version to 10.1.0 to rake, version 0.9.2
    3. gem uninstall rake -v 10.1.0
    4. gem install rake -v 0.9.2
    
    2.7 Edit your rake file from fedena project
    vi fedena-v2.3-bundle-linux/Rakefile
    Replace require 'rake/rdoctask' to require 'rdoc/task'
    
    2.8. Set up Fedena databases 
    
    From the Fedena source directory in terminal run, "rake db:create" followed by, "rake fedena:plugins:install_all" 
    
    2.9 Change permissions for scripts
    
    From the same directory grant executable permissions for the files in script directory by,
    "chmod +x script/*" 
    
    2.10 Run the inbuilt server
    
    If everything went fine till now, you are ready to run fedena server by running the following from fedena source folder,
    "script/server"